segmentio / myth

A CSS preprocessor that acts like a polyfill for future versions of the spec.
4.32k stars 131 forks source link

Option to convert units for rem/px fallback from base <html> #52

Closed adamcbrewer closed 10 years ago

adamcbrewer commented 10 years ago

I see it's quite common these days to set the font-size on the html element to 62.5% – this is to allow for an easier rem declaration with px fallback. For example:

html {
    font-size: 62.5%;
}
body {
    font-size: 16px;
    font-size: 1.6rem;
}

However, when I try to use this with Myth I still see the px fallback value as calculated from a 100% base.

Is there any way to pass in an option to 'adjust' the calculated px value when using rems? Thanks

adamcbrewer commented 10 years ago

Apologies, seems we were using a separate module to handle the px-rem conversion.