From bab633f8a6faf4be7cd4ebd16b1b5c270d95320a Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 5 Feb 2022 08:57:44 +0100 Subject: Lint --- src/_contexts.scss | 2 +- src/_easing.scss | 52 ++++++++++++++++++------------------ src/_harmony.scss | 6 +++-- src/_props.scss | 4 +-- src/_responsive.scss | 72 +++++++++++++++++++++++++------------------------- src/bem/_element.scss | 30 ++++++++++++++------- src/bem/_modifier.scss | 18 ++++++++----- src/bem/_state.scss | 6 +++-- 8 files changed, 105 insertions(+), 85 deletions(-) (limited to 'src') diff --git a/src/_contexts.scss b/src/_contexts.scss index 8542056..7ffbb4e 100644 --- a/src/_contexts.scss +++ b/src/_contexts.scss @@ -194,7 +194,7 @@ $stacks: (); } @mixin assert-stack-must-contain($stack-id, $context-ids, $check-head-only: false) { - $noop: assert-stack-must-contain($stack-id, $context-ids, $check-head-only) + $noop: assert-stack-must-contain($stack-id, $context-ids, $check-head-only); } /// diff --git a/src/_easing.scss b/src/_easing.scss index 8b06632..8bcfd39 100644 --- a/src/_easing.scss +++ b/src/_easing.scss @@ -24,7 +24,7 @@ $cubic-bezier-sample-pool-size: 10 !default; /// /// Minimum slope required to use the Newton-Raphson method for cubic bezier calculations. /// -$cubic-bezier-newton-min-slope: 0.001 !default; +$cubic-bezier-newton-min-slope: .001 !default; /// /// Number of iterations of the Newton-Raphson method. @@ -34,7 +34,7 @@ $cubic-bezier-newton-iters: 4 !default; /// /// Precision of the subdivision method for cubic bezier calculations. /// -$cubic-bezier-subdiv-precision: 0.0000001 !default; +$cubic-bezier-subdiv-precision: .0000001 !default; /// /// Maximum iterations of the subdivision method for cubic bezier calculations. @@ -217,7 +217,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease($x) { - @return cubic-bezier(0.25, 0.1, 0.25, 1, $x); + @return cubic-bezier(.25, .1, .25, 1, $x); } /// @@ -228,7 +228,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-in($x) { - @return cubic-bezier(0.42, 0, 1, 1, $x); + @return cubic-bezier(.42, 0, 1, 1, $x); } /// @@ -239,7 +239,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-out($x) { - @return cubic-bezier(0, 0, 0.58, 1, $x); + @return cubic-bezier(0, 0, .58, 1, $x); } /// @@ -250,7 +250,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-in-out($x) { - @return cubic-bezier(0.42, 0, 0.58, 1, $x); + @return cubic-bezier(.42, 0, .58, 1, $x); } /// @@ -261,7 +261,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-in-sine($x) { - @return cubic-bezier(0.47, 0, 0.745, 0.715, $x); + @return cubic-bezier(.47, 0, .745, .715, $x); } /// @@ -272,7 +272,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-out-sine($x) { - @return cubic-bezier(0.39, 0.575, 0.565, 1, $x); + @return cubic-bezier(.39, .575, .565, 1, $x); } /// @@ -283,7 +283,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-in-out-sine($x) { - @return cubic-bezier(0.445, 0.05, 0.55, 0.95, $x); + @return cubic-bezier(.445, .05, .55, .95, $x); } /// @@ -294,7 +294,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-in-quad($x) { - @return cubic-bezier(0.55, 0.085, 0.68, 0.53, $x); + @return cubic-bezier(.55, .085, .68, .53, $x); } /// @@ -305,7 +305,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-out-quad($x) { - @return cubic-bezier(0.25, 0.46, 0.45, 0.94, $x); + @return cubic-bezier(.25, .46, .45, .94, $x); } /// @@ -316,7 +316,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-in-out-quad($x) { - @return cubic-bezier(0.455, 0.03, 0.515, 0.955, $x); + @return cubic-bezier(.455, .03, .515, .955, $x); } /// @@ -327,7 +327,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-in-cubic($x) { - @return cubic-bezier(0.55, 0.055, 0.675, 0.19, $x); + @return cubic-bezier(.55, .055, .675, .19, $x); } /// @@ -338,7 +338,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-out-cubic($x) { - @return cubic-bezier(0.215, 0.61, 0.355, 1, $x); + @return cubic-bezier(.215, .61, .355, 1, $x); } /// @@ -349,7 +349,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-in-out-cubic($x) { - @return cubic-bezier(0.645, 0.045, 0.355, 1, $x); + @return cubic-bezier(.645, .045, .355, 1, $x); } /// @@ -360,7 +360,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-in-quart($x) { - @return cubic-bezier(0.895, 0.03, 0.685, 0.22, $x); + @return cubic-bezier(.895, .03, .685, .22, $x); } /// @@ -371,7 +371,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-out-quart($x) { - @return cubic-bezier(0.165, 0.84, 0.44, 1, $x); + @return cubic-bezier(.165, .84, .44, 1, $x); } /// @@ -382,7 +382,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-in-out-quart($x) { - @return cubic-bezier(0.77, 0, 0.175, 1, $x); + @return cubic-bezier(.77, 0, .175, 1, $x); } /// @@ -393,7 +393,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-in-quint($x) { - @return cubic-bezier(0.755, 0.05, 0.855, 0.06, $x); + @return cubic-bezier(.755, .05, .855, .06, $x); } /// @@ -404,7 +404,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-out-quint($x) { - @return cubic-bezier(0.23, 1, 0.32, 1, $x); + @return cubic-bezier(.23, 1, .32, 1, $x); } /// @@ -415,7 +415,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-in-out-quint($x) { - @return cubic-bezier(0.86, 0, 0.07, 1, $x); + @return cubic-bezier(.86, 0, .07, 1, $x); } /// @@ -426,7 +426,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-in-expo($x) { - @return cubic-bezier(0.95, 0.05, 0.795, 0.035, $x); + @return cubic-bezier(.95, .05, .795, .035, $x); } /// @@ -437,7 +437,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-out-expo($x) { - @return cubic-bezier(0.19, 1, 0.22, 1, $x); + @return cubic-bezier(.19, 1, .22, 1, $x); } /// @@ -459,7 +459,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-in-circ($x) { - @return cubic-bezier(0.6, 0.04, 0.98, 0.335, $x); + @return cubic-bezier(.6, .04, .98, .335, $x); } /// @@ -470,7 +470,7 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-out-circ($x) { - @return cubic-bezier(0.075, 0.82, 0.165, 1, $x); + @return cubic-bezier(.075, .82, .165, 1, $x); } /// @@ -481,5 +481,5 @@ $cubic-bezier-subdiv-max-iters: 10 !default; /// @return {number} /// @function ease-in-out-circ($x) { - @return cubic-bezier(0.785, 0.135, 0.15, 0.86, $x); + @return cubic-bezier(.785, .135, .15, .86, $x); } diff --git a/src/_harmony.scss b/src/_harmony.scss index 839036c..aaab726 100644 --- a/src/_harmony.scss +++ b/src/_harmony.scss @@ -89,9 +89,11 @@ $new-map: (); @each $key, $value in $responsive-map { - $new-map: map-merge($new-map, ( + $new-map: map-merge( + $new-map, ( $key: modular-scale($times, $value...) - )); + ) + ); } @include responsive.property($props, $new-map, $fluid); diff --git a/src/_props.scss b/src/_props.scss index cdb96c2..db24dff 100644 --- a/src/_props.scss +++ b/src/_props.scss @@ -121,7 +121,7 @@ $namespace-context-id: 'namespace' !default; $ns-key: get-ns-key(); @if $ns-key != null { - $map: ($ns-key: $map) + $map: ($ns-key: $map); } } @@ -303,7 +303,7 @@ $namespace-context-id: 'namespace' !default; $map: map-remove($map, $skip...); @if type-of($prefix) == list { - $prefix: functions.str-implode($prefix) + $prefix: functions.str-implode($prefix); } @if not $global { diff --git a/src/_responsive.scss b/src/_responsive.scss index 9520dfc..c907085 100644 --- a/src/_responsive.scss +++ b/src/_responsive.scss @@ -182,11 +182,11 @@ $context-id: 'responsive' !default; $last-vp: nth($viewports, length($viewports)); @include contexts.push($context-id, 'env', ( - 'viewports': $viewports, - 'mode': set, - 'index': 1, - 'fluid': $fluid, - 'vertical': $vertical, + 'viewports': $viewports, + 'mode': set, + 'index': 1, + 'fluid': $fluid, + 'vertical': $vertical, )); @content; @@ -200,11 +200,11 @@ $context-id: 'responsive' !default; @if not $vertical { @media (min-width: $prev-vp) and (max-width: $next-vp) { @include contexts.push($context-id, 'env', ( - 'viewports': $viewports, - 'mode': transition, - 'index': $i, - 'fluid': $fluid, - 'vertical': $vertical, + 'viewports': $viewports, + 'mode': transition, + 'index': $i, + 'fluid': $fluid, + 'vertical': $vertical, )); @content; @@ -214,11 +214,11 @@ $context-id: 'responsive' !default; } @else { @media (min-height: $prev-vp) and (max-height: $next-vp) { @include contexts.push($context-id, 'env', ( - 'viewports': $viewports, - 'mode': transition, - 'index': $i, - 'fluid': $fluid, - 'vertical': $vertical, + 'viewports': $viewports, + 'mode': transition, + 'index': $i, + 'fluid': $fluid, + 'vertical': $vertical, )); @content; @@ -231,11 +231,11 @@ $context-id: 'responsive' !default; @if not $vertical { @media (min-width: $last-vp) { @include contexts.push($context-id, 'env', ( - 'viewports': $viewports, - 'mode': set, - 'index': length($viewports), - 'fluid': $fluid, - 'vertical': $vertical, + 'viewports': $viewports, + 'mode': set, + 'index': length($viewports), + 'fluid': $fluid, + 'vertical': $vertical, )); @content; @@ -245,11 +245,11 @@ $context-id: 'responsive' !default; } @else { @media (min-height: $last-vp) { @include contexts.push($context-id, 'env', ( - 'viewports': $viewports, - 'mode': set, - 'index': length($viewports), - 'fluid': $fluid, - 'vertical': $vertical, + 'viewports': $viewports, + 'mode': set, + 'index': length($viewports), + 'fluid': $fluid, + 'vertical': $vertical, )); @content; @@ -259,11 +259,11 @@ $context-id: 'responsive' !default; } } @else { @include contexts.push($context-id, 'env', ( - 'viewports': $viewports, - 'mode': set, - 'index': 1, - 'fluid': $fluid, - 'vertical': $vertical, + 'viewports': $viewports, + 'mode': set, + 'index': 1, + 'fluid': $fluid, + 'vertical': $vertical, )); @content; @@ -276,9 +276,9 @@ $context-id: 'responsive' !default; @if not $vertical { @media (min-width: $vp) { @include contexts.push($context-id, 'env', ( - 'viewports': $viewports, - 'mode': set, - 'index': $i + 'viewports': $viewports, + 'mode': set, + 'index': $i )); @content; @@ -288,9 +288,9 @@ $context-id: 'responsive' !default; } @else { @media (min-height: $vp) { @include contexts.push($context-id, 'env', ( - 'viewports': $viewports, - 'mode': set, - 'index': $i + 'viewports': $viewports, + 'mode': set, + 'index': $i )); @content; diff --git a/src/bem/_element.scss b/src/bem/_element.scss index 84e85fb..25377d6 100644 --- a/src/bem/_element.scss +++ b/src/bem/_element.scss @@ -147,10 +147,12 @@ @each $name in join($name, $names) { $sel: selector-append(&, vars.$element-separator + $name); $selector: join($selector, $sel, comma); - $parts-data: append($parts-data, ( + $parts-data: append( + $parts-data, ( 'name': $name, 'selector': $sel - )); + ) + ); } } @@ -170,10 +172,12 @@ @each $name in join($name, $names) { $sel: selector-append(&, vars.$element-separator + $name); $selector: join($selector, $sel, comma); - $parts-data: append($parts-data, ( + $parts-data: append( + $parts-data, ( 'name': $name, 'selector': $sel - )); + ) + ); } } @else { // @@ -191,10 +195,12 @@ @each $name in join($name, $names) { $sel: selector-nest(&, selector-append($block-base-selector, vars.$element-separator + $name)); $selector: join($selector, $sel, comma); - $parts-data: append($parts-data, ( + $parts-data: append( + $parts-data, ( 'name': $name, 'selector': $sel - )); + ) + ); } } } @@ -336,10 +342,12 @@ @each $name in join($name, $names) { $sel: selector-nest(&, $sign, selector-append($block-base-selector, vars.$element-separator + $name)); $selector: join($selector, $sel, comma); - $parts-data: append($parts-data, ( + $parts-data: append( + $parts-data, ( 'name': $name, 'selector': $sel - )); + ) + ); } $context: 'element', ( @@ -562,10 +570,12 @@ } $selector: join($selector, $sel, comma); - $parts-data: append($parts-data, ( + $parts-data: append( + $parts-data, ( 'name': $part-name, 'selector': $sel - )); + ) + ); } $context: 'element', ( diff --git a/src/bem/_modifier.scss b/src/bem/_modifier.scss index be65e47..07267fe 100644 --- a/src/bem/_modifier.scss +++ b/src/bem/_modifier.scss @@ -177,10 +177,12 @@ $sel: selector-append(&, vars.$modifier-separator + $name); $selector: join($selector, $sel, comma); - $parts-data: append($parts-data, ( + $parts-data: append( + $parts-data, ( 'name': $name, 'selector': $sel - )); + ) + ); } @else { // // Parent context is modifier, suffix or state and $extend is false. @@ -219,10 +221,12 @@ } $selector: join($selector, $nsel, comma); - $parts-data: append($parts-data, ( + $parts-data: append( + $parts-data, ( 'name': $name, 'selector': $nsel - )); + ) + ); } @else { // // Latest context is block. Just append the modifier part. @@ -234,10 +238,12 @@ $sel: selector-append(&, $block-base-selector, vars.$modifier-separator + $name); $selector: join($selector, $sel, comma); - $parts-data: append($parts-data, ( + $parts-data: append( + $parts-data, ( 'name': $name, 'selector': $sel - )); + ) + ); } } } diff --git a/src/bem/_state.scss b/src/bem/_state.scss index 2d430bf..41bacee 100644 --- a/src/bem/_state.scss +++ b/src/bem/_state.scss @@ -91,10 +91,12 @@ $sel: selector-append(&, $sel); } $selector: join($selector, $sel, comma); - $parts-data: append($parts-data, ( + $parts-data: append( + $parts-data, ( 'name': $state, 'selector': $sel - )); + ) + ); } $context: 'state', ( -- cgit v1.2.3-70-g09d2