diff --git a/scss/components/_dropdown-menu.scss b/scss/components/_dropdown-menu.scss index 631a98772b..7ea6c34090 100644 --- a/scss/components/_dropdown-menu.scss +++ b/scss/components/_dropdown-menu.scss @@ -124,7 +124,7 @@ $dropdownmenu-border-width: nth($dropdownmenu-border, 1); } @each $size in $breakpoint-classes { - @if $size != small { + @if $size != $-zf-zero-breakpoint { @include breakpoint($size) { &.#{$size}-horizontal { @include dropdown-menu-direction(horizontal); diff --git a/scss/components/_media-object.scss b/scss/components/_media-object.scss index 35751d79e5..00e615e847 100644 --- a/scss/components/_media-object.scss +++ b/scss/components/_media-object.scss @@ -75,13 +75,13 @@ $mediaobject-image-width-stacked: 100% !default; } @if $global-flexbox { - &.stack-for-small { + &.stack-for-#{$-zf-zero-breakpoint} { flex-wrap: wrap; } } - &.stack-for-small .media-object-section { - @include breakpoint(small only) { + &.stack-for-#{$-zf-zero-breakpoint} .media-object-section { + @include breakpoint($-zf-zero-breakpoint only) { @include media-object-stack; } } diff --git a/scss/components/_menu.scss b/scss/components/_menu.scss index 3905041f9f..0cecaef794 100644 --- a/scss/components/_menu.scss +++ b/scss/components/_menu.scss @@ -234,7 +234,7 @@ $menu-icon-spacing: 0.25rem !default; } @each $size in $breakpoint-classes { - @if $size != small { + @if $size != $-zf-zero-breakpoint { @include breakpoint($size) { &.#{$size}-horizontal { @include menu-direction(horizontal); diff --git a/scss/components/_off-canvas.scss b/scss/components/_off-canvas.scss index 769d2612ac..e7175e9782 100644 --- a/scss/components/_off-canvas.scss +++ b/scss/components/_off-canvas.scss @@ -162,7 +162,7 @@ $maincontent-shadow: 0 0 10px rgba($black, 0.5) !default; // Reveal off-canvas menu on larger screens @each $name, $value in $breakpoint-classes { - @if $name != small { + @if $name != $-zf-zero-breakpoint { @include breakpoint($name) { .position-left.reveal-for-#{$name} { @include off-canvas-reveal(left); diff --git a/scss/components/_reveal.scss b/scss/components/_reveal.scss index 62357375f9..1c0efec6a7 100644 --- a/scss/components/_reveal.scss +++ b/scss/components/_reveal.scss @@ -154,7 +154,7 @@ $reveal-overlay-background: rgba($black, 0.45) !default; @include reveal-modal-fullscreen; } - @include breakpoint(small only) { + @include breakpoint($-zf-zero-breakpoint only) { @include reveal-modal-fullscreen; } diff --git a/scss/components/_top-bar.scss b/scss/components/_top-bar.scss index cb4fcd6d03..f56d3d0410 100644 --- a/scss/components/_top-bar.scss +++ b/scss/components/_top-bar.scss @@ -128,7 +128,7 @@ $topbar-unstack-breakpoint: medium !default; // Generate classes for stacking on each screen size (defined in $breakpoint-classes) @each $size in $breakpoint-classes { - @if $size != small { + @if $size != $-zf-zero-breakpoint { &.stacked-for-#{$size} { @include breakpoint($size down) { @include top-bar-stacked; diff --git a/scss/components/_visibility.scss b/scss/components/_visibility.scss index c8e30f69c3..8906f5977f 100644 --- a/scss/components/_visibility.scss +++ b/scss/components/_visibility.scss @@ -69,7 +69,7 @@ // Responsive visibility classes @each $size in $breakpoint-classes { - @if $size != small { + @if $size != $-zf-zero-breakpoint { .hide-for-#{$size} { @include hide-for($size); } diff --git a/scss/grid/_flex-grid.scss b/scss/grid/_flex-grid.scss index 7333eb1f7b..1dcf34e8b1 100644 --- a/scss/grid/_flex-grid.scss +++ b/scss/grid/_flex-grid.scss @@ -213,7 +213,7 @@ } } - @if $-zf-size != small { + @if $-zf-size != $-zf-zero-breakpoint { // Sizing (expand) @include breakpoint($-zf-size) { .#{$-zf-size}-expand { diff --git a/scss/grid/_row.scss b/scss/grid/_row.scss index dacdfafb83..daa71e03c5 100644 --- a/scss/grid/_row.scss +++ b/scss/grid/_row.scss @@ -80,7 +80,7 @@ /// @param {Map|null} $gutter [null] - Gutter value to use when inverting the margins. Set to `null` to refer to the responsive gutter settings. @mixin grid-row-nest($gutter: $grid-column-gutter) { @if type-of($gutter) == 'number' { - $gutter: (small: $gutter); + $gutter: ($-zf-zero-breakpoint: $gutter); } @each $breakpoint, $value in $gutter { diff --git a/scss/typography/_alignment.scss b/scss/typography/_alignment.scss index cfd3e99c7f..77ffd61741 100644 --- a/scss/typography/_alignment.scss +++ b/scss/typography/_alignment.scss @@ -6,7 +6,7 @@ @each $size in $breakpoint-classes { @include breakpoint($size) { @each $align in (left, right, center, justify) { - @if $size != 'small' { + @if $size != $-zf-zero-breakpoint { .#{$size}-text-#{$align} { text-align: $align; } diff --git a/scss/util/_breakpoint.scss b/scss/util/_breakpoint.scss index 688301f4c2..55bc0299db 100644 --- a/scss/util/_breakpoint.scss +++ b/scss/util/_breakpoint.scss @@ -18,11 +18,12 @@ $breakpoints: ( xxlarge: 1440px, ) !default; -@if not map-has-key($breakpoints, small) or not map-has-key($breakpoints, medium) { - @error 'Your list of breakpoints (defined in $breakpoints) must include one named "small" and one named "medium".'; -} -@else if map-get($breakpoints, small) != 0 { - @error 'Your "small" breakpoint (defined in $breakpoints) must be set to "0".'; +$-zf-zero-breakpoint: small !default; + +@if nth(map-values($breakpoints),1) != 0 { + @error 'Your smallest breakpoint (defined in $breakpoints) must be set to "0".'; +} @else { + $-zf-zero-breakpoint: nth(map-keys($breakpoints),1); } /// All of the names in this list will be output as classes in your CSS, like `.small-12`, `.medium-6`, and so on. Each value in this list must also be in the `$breakpoints` map. @@ -32,7 +33,7 @@ $breakpoint-classes: (small medium large) !default; /// Generates a media query string matching the input value. Refer to the documentation for the `breakpoint()` mixin to see what the possible inputs are. /// /// @param {Keyword|Number} $val [small] - Breakpoint name, or px, rem, or em value to process. -@function breakpoint($val: small) { +@function breakpoint($val: $-zf-zero-breakpoint) { // Size or keyword $bp: nth($val, 1); // Value for max-width media queries diff --git a/scss/util/_mixins.scss b/scss/util/_mixins.scss index a984aa7551..fb0768ed2b 100644 --- a/scss/util/_mixins.scss +++ b/scss/util/_mixins.scss @@ -220,7 +220,7 @@ $map: $breakpoint-classes; @if not $small { - $map: map-remove($map, small); + $map: map-remove($map, $-zf-zero-breakpoint); } @each $size in $map {