I have a document that describes font sizes in pts, and I have for my purposes discovered that 2.8pt translates to 1rem in my use case.
So naturally I made an scss function to do the translations for me:
@mixin ptFontSize($pt) {
font-size: ($pt/2.8)rem;
}
So that when the documentation says p.big should be 14pt
, I can put this in my css:
p.big {
@include ptFontSize(14);
}
However scss is outputting a space between the number and rem
:
font-size: 5 rem;
And Chrome isn't liking that space being there. What's the right way to make this mixin function to output correctly into css?