studiometa / scss-toolkit

A small and configurable SCSS Toolkit to boost your project! 🚀
MIT License
5 stars 0 forks source link

Conflict of classes on default config #16

Closed perruche closed 5 years ago

perruche commented 5 years ago

1.1.0 introduce type-medium for font-weight rules

$font-sizes also contain a medium key, which lead to having two type-medium class

type-medium { font-weight: 500; } type-medium { font-size: 14; line-height: 26px; }

This will be fix with the #12 or #13, since $font-sizeswill probably change a lot.

Does this need a patch ?

titouanmathis commented 5 years ago

Maybe we should prefix the font-weight classes to be more specific and avoid such conflict. Creating a font-weight maps would be interesting too I think, to be able to limit the compiled classes to a minimum.

Something like the following:

$font-weights: (100, 200, 300, 400, 500, 600, 700, 800, 900) !default;

@each $font-weight in $font-weights {
  .type-weight-#{$font-weight} {
    font-weight: $font-weight;
  }
}

@perruche could you create a feature and PR for this? It would be nice to release it in the 1.2.0 version next week 🙂

perruche commented 5 years ago

solved in #18