studiometa / scss-toolkit

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

[v3 beta] @mixin font-size bug calcul #48

Closed w-jerome closed 4 years ago

w-jerome commented 4 years ago

_config.scss

$type-sizes : (
  body : (
    default : (
      font-size: 16px,
      line-height: 28px,
    ),
    s : (
      font-size: 18px,
      line-height: 32px,
    ),
  ),
) ;

When I do a @include font-size('body') it returns font-size: /16pxem; so I can't display my font size correctly.

titouanmathis commented 4 years ago

You have to use size keys instead of font-size :

$type-sizes : (
  body : (
    default : (
      size: 16px,
      line-height: 28px,
    ),
    s : (
      size: 18px,
      line-height: 32px,
    ),
  ),
) ;

See the map-get function in the source file : https://github.com/studiometa/scss-toolkit/blob/release/3.0.0/src/framework/_typography.scss#L131.