Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Root font size not respected with rem units in responsive type #51

Open
jigsawsoul opened this issue May 23, 2017 · 2 comments
Open

Root font size not respected with rem units in responsive type #51

jigsawsoul opened this issue May 23, 2017 · 2 comments

Comments

@jigsawsoul
Copy link

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?

@madeleineostoja
Copy link
Owner

This would be caused by madeleineostoja/postcss-responsive-type#23

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

@madeleineostoja
Copy link
Owner

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

@madeleineostoja madeleineostoja changed the title using rem's font size becomes larger then max value. Root font size not respected with rem units in responsive type Jun 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants