From 6fbe16c8e9c1e2932dbe47d7a82d4c3fada035bf Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 13 Jun 2022 17:09:22 +0200 Subject: Fix named viewports --- src/_responsive.scss | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'src') 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 @@ @use './contexts'; /// -/// If true, named viewports will be supported if a compatible $breakpoints map exists. -/// This is the case for [include-media](https://include-media.com/), for example. +/// Context ID used for responsive environment-related mixins. /// -/// @type bool +/// @type string /// -$support-named-viewports: true !default; +$context-id: 'responsive' !default; /// /// Context ID used for responsive environment-related mixins. /// -/// @type string +/// @type list /// -$context-id: 'responsive' !default; +$named-viewports: () !default; /// /// Scale a property uniformly between a specific set of target viewports / values. @@ -158,10 +157,8 @@ $context-id: 'responsive' !default; $new-viewports: (); @each $viewport in $viewports { - @if $support-named-viewports and global-variable-exists(breakpoints) { - @if map-has-key($breakpoints, $viewport) { - $viewport: map-get($breakpoints, $viewport); - } + @if map-has-key($named-viewports, $viewport) { + $viewport: map-get($named-viewports, $viewport); } @if (type-of($viewport) != number) or unitless($viewport) { -- cgit v1.2.3-70-g09d2