rucksack icon indicating copy to clipboard operation
rucksack copied to clipboard

Root font size not respected with rem units in responsive type

Open jigsawsoul opened this issue 7 years ago • 2 comments

html {
    font-size: 62.5%;
}

h1 {
    font-size: responsive 2rem 3.5rem;
}

when the first media query kicks in the h1 becomes 48.3674px computed, 3.5rems is only equal to 35px

ont-size: calc(2rem + 1.5 * ((100vw - 26.25rem) / 53.75));

Any idea why this is happening?

jigsawsoul avatar May 23 '17 11:05 jigsawsoul

This would be caused by https://github.com/seaneking/postcss-responsive-type/issues/23

The percentage font size on html isn't respected, so it's assuming 1rem = 16px

madeleineostoja avatar May 23 '17 12:05 madeleineostoja

Need to push a patch but I'm swamped at the moment, happy to take a PR. Should be an easy fix.

madeleineostoja avatar May 23 '17 12:05 madeleineostoja