How do I set a media breakpoint let's say from medium to large - do I nest the min mixin and max mixin or how do I do that.
the output I'm after is something like this: @media (min-width: 480px) and (max-width: 767px) using the breakpoint mixin.
How do I set a media breakpoint let's say from medium to large - do I nest the min mixin and max mixin or how do I do that.
the output I'm after is something like this: @media (min-width: 480px) and (max-width: 767px) using the breakpoint mixin.
You do a combo of two classes. (Also BS4 uses rems now not px.)
Example... (From: http://codepen.io/j_holtslander/pen/jbEGWb)
Here is also mixin
media-breakpoint-between($lower, $upper)
So this should work
Use
media-breakpoint-between($lower, $upper)
Dependencies
The mixins are declared in
mixins/_breakpoints.scss
, and depend on the $grid-breakpoints map, found in_variables.scss
.Example
Breakpoint map:
Mixin:
Compiles to
Important notice
Media-breakpoint-between mixin uses 'lower' and 'upper' values of declared breakpoint.
The 'lower' value of breakpoint is the declared value in $grid-breakpoint map.
The 'upper' value of specific breakpoint is equal to the value of higher breakpoint minus 1px.
Upper & lower breakpoint values example (based od $grid-breakpoint map)
Other media mixins
@include media-breakpoint-up(sm) {}
creates a breakpoint with a min-width of$sm
.@include media-breakpoint-down(md) {}
creates a breakpoint with a max-width of$md
.