Financial-Times / o-typography

Typography and vertical rhythm styles for FT branding
http://registry.origami.ft.com/components/o-typography
10 stars 2 forks source link

Make sure $icon-padding-calc concatenates correctly as a calc and not… #243

Closed JakeChampion closed 4 years ago

JakeChampion commented 4 years ago

… a string

Without this change, dart-sass would produce this error:

  Erroneous area:
1: 1em0.5ch - 0.25em - 0.25em
^..^

https://www.sassmeister.com/gist/8cde2b80deba9cfe9504e1d8f87f0895

origamiserviceuser commented 4 years ago

o-typography bundle size difference from 6.1.1 to 5013c9b3e539a2409c67ee740ff81ae2b102caf0 No significant bundle size differences found.

JakeChampion commented 4 years ago

You can nest calc, it's perfectly valid css https://stackoverflow.com/a/36414853

JakeChampion commented 4 years ago

$icon-padding-calc: #{$icon-size} + #{0.5ch};

I tested that out and it looks to not work -- https://www.sassmeister.com/gist/e76ceae6a994c795bcc60e9935f7c70e