aws / mynah-ui

https://aws.github.io/mynah-ui/
Apache License 2.0
13 stars 11 forks source link

Refactor: SCSS #61

Closed 32teeth closed 2 months ago

32teeth commented 2 months ago

Problem

Solution

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};
      }
    }
  }
}

Notes

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.