Closed 32teeth closed 2 months ago
:export
@include
.token
icss
webpack.config.js
/examples
root
npm run watch
@mixins
export-map
@function
flatten
@each
@for
_variables
$mynah-color-text
$mynah-statuses
$mynah-status-colors
$mynah-font-sizes
$mynah-padding-sizes
$mynah-transitions
$mynah-syntax-colors
$mynah-token-styles
$mynah-syntax-token-styles
Notably, $mynah-syntax-token-styles helped eliminate 70 lines of .token declarations with the following code:
@each $style, $tokens in $mynah-syntax-token-styles { @each $token in $tokens { .token.#{$token} { @each $property, $value in map-get($mynah-token-styles, $style) { #{$property}: #{$value}; } } } }
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Problem
:export
feature, requiring the use of@include
and maps or arrays created at the root level..token
declarations, which undermined the benefits of using SCSS as a preprocessor.Solution
icss
mode to bothwebpack.config.js
files./examples
androot
folders usingnpm run watch
and build.@mixins
:export-map
for leveraging the:export
feature of SCSS.@function
flatten
to avoid nested unnamed functions within@mixins
.@each
and@for
loops._variables
:$mynah-color-text
$mynah-statuses
$mynah-status-colors
$mynah-font-sizes
$mynah-padding-sizes
$mynah-transitions
$mynah-syntax-colors
$mynah-token-styles
$mynah-syntax-token-styles
Notably,
$mynah-syntax-token-styles
helped eliminate 70 lines of.token
declarations with the following code:Notes
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.