Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
746e09f8
Commit
746e09f8
authored
Dec 29, 2014
by
Chris Rebert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename media-breakpoint-{min,max} => media-breakpoint-{up,down}
parent
ff9c07f4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
scss/_grid.scss
scss/_grid.scss
+1
-1
scss/mixins/_breakpoints.scss
scss/mixins/_breakpoints.scss
+7
-4
scss/mixins/_grid-framework.scss
scss/mixins/_grid-framework.scss
+1
-1
scss/mixins/_media-queries.scss
scss/mixins/_media-queries.scss
+4
-4
No files found.
scss/_grid.scss
View file @
746e09f8
...
...
@@ -12,7 +12,7 @@
// For each breakpoint, define the maximum width of the container in a media query
@each
$breakpoint
,
$container-max-width
in
$container-max-widths
{
@include
media-breakpoint-
min
(
$breakpoint
)
{
@include
media-breakpoint-
up
(
$breakpoint
)
{
max-width
:
$container-max-width
;
}
}
...
...
scss/mixins/_breakpoints.scss
View file @
746e09f8
...
...
@@ -39,7 +39,8 @@
}
// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
@mixin
media-breakpoint-min
(
$name
,
$breakpoints
:
$grid-breakpoints
)
{
// Makes the @content apply to the given breakpoint and wider.
@mixin
media-breakpoint-up
(
$name
,
$breakpoints
:
$grid-breakpoints
)
{
$min
:
breakpoint-min
(
$name
,
$breakpoints
);
@if
$min
{
@media
(
min-width
:
$min
)
{
...
...
@@ -51,7 +52,8 @@
}
// Media of at most the maximum breakpoint width. No query for the largest breakpoint.
@mixin
media-breakpoint-max
(
$name
,
$breakpoints
:
$grid-breakpoints
)
{
// Makes the @content apply to the given breakpoint and narrower.
@mixin
media-breakpoint-down
(
$name
,
$breakpoints
:
$grid-breakpoints
)
{
$max
:
breakpoint-max
(
$name
,
$breakpoints
);
@if
$max
{
@media
(
max-width
:
$max
)
{
...
...
@@ -64,6 +66,7 @@
// Media between the breakpoint's minimum and maximum widths.
// No minimum for the smallest breakpoint, and no maximum for the largest one.
// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
@mixin
media-breakpoint-only
(
$name
,
$breakpoints
:
$grid-breakpoints
)
{
// Nested media query combination does not work in libsass yet
// https://github.com/sass/libsass/issues/185
...
...
@@ -76,8 +79,8 @@
}
}
@else
{
// One of min or max is a no-op, so this branch is not affected by libsass#185
@include
media-breakpoint-
min
(
$name
,
$breakpoints
)
{
@include
media-breakpoint-
max
(
$name
,
$breakpoints
)
{
@include
media-breakpoint-
up
(
$name
,
$breakpoints
)
{
@include
media-breakpoint-
down
(
$name
,
$breakpoints
)
{
@content
;
}
}
...
...
scss/mixins/_grid-framework.scss
View file @
746e09f8
...
...
@@ -19,7 +19,7 @@
@extend
%grid-column
;
}
}
@include
media-breakpoint-
min
(
$breakpoint
)
{
@include
media-breakpoint-
up
(
$breakpoint
)
{
// Work around cross-media @extend (https://github.com/sass/sass/issues/1050)
%grid-column-float-
#{
$breakpoint
}
{
float
:
left
;
...
...
scss/mixins/_media-queries.scss
View file @
746e09f8
// Media query mixins for default breakpoints
@mixin
media-xs
()
{
@include
media-breakpoint-
max
(
xs
)
{
@content
}
@include
media-breakpoint-
down
(
xs
)
{
@content
}
}
@mixin
media-sm
()
{
@include
media-breakpoint-
min
(
sm
)
{
@content
}
@include
media-breakpoint-
up
(
sm
)
{
@content
}
}
@mixin
media-sm-max
()
{
...
...
@@ -13,7 +13,7 @@
}
@mixin
media-md
()
{
@include
media-breakpoint-
min
(
md
)
{
@content
}
@include
media-breakpoint-
up
(
md
)
{
@content
}
}
@mixin
media-md-max
()
{
...
...
@@ -21,5 +21,5 @@
}
@mixin
media-lg
()
{
@include
media-breakpoint-
min
(
lg
)
{
@content
}
@include
media-breakpoint-
up
(
lg
)
{
@content
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment