diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/_responsive.scss | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/_responsive.scss b/src/_responsive.scss index c907085..4d98638 100644 --- a/src/_responsive.scss +++ b/src/_responsive.scss | |||
@@ -21,19 +21,18 @@ | |||
21 | @use './contexts'; | 21 | @use './contexts'; |
22 | 22 | ||
23 | /// | 23 | /// |
24 | /// If true, named viewports will be supported if a compatible $breakpoints map exists. | 24 | /// Context ID used for responsive environment-related mixins. |
25 | /// This is the case for [include-media](https://include-media.com/), for example. | ||
26 | /// | 25 | /// |
27 | /// @type bool | 26 | /// @type string |
28 | /// | 27 | /// |
29 | $support-named-viewports: true !default; | 28 | $context-id: 'responsive' !default; |
30 | 29 | ||
31 | /// | 30 | /// |
32 | /// Context ID used for responsive environment-related mixins. | 31 | /// Context ID used for responsive environment-related mixins. |
33 | /// | 32 | /// |
34 | /// @type string | 33 | /// @type list |
35 | /// | 34 | /// |
36 | $context-id: 'responsive' !default; | 35 | $named-viewports: () !default; |
37 | 36 | ||
38 | /// | 37 | /// |
39 | /// Scale a property uniformly between a specific set of target viewports / values. | 38 | /// Scale a property uniformly between a specific set of target viewports / values. |
@@ -158,10 +157,8 @@ $context-id: 'responsive' !default; | |||
158 | $new-viewports: (); | 157 | $new-viewports: (); |
159 | 158 | ||
160 | @each $viewport in $viewports { | 159 | @each $viewport in $viewports { |
161 | @if $support-named-viewports and global-variable-exists(breakpoints) { | 160 | @if map-has-key($named-viewports, $viewport) { |
162 | @if map-has-key($breakpoints, $viewport) { | 161 | $viewport: map-get($named-viewports, $viewport); |
163 | $viewport: map-get($breakpoints, $viewport); | ||
164 | } | ||
165 | } | 162 | } |
166 | 163 | ||
167 | @if (type-of($viewport) != number) or unitless($viewport) { | 164 | @if (type-of($viewport) != number) or unitless($viewport) { |