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

Responsive Typography sizing off when using REMs #69

Open
ekfuhrmann opened this issue Sep 19, 2018 · 0 comments
Open

Responsive Typography sizing off when using REMs #69

ekfuhrmann opened this issue Sep 19, 2018 · 0 comments

Comments

@ekfuhrmann
Copy link

I understand the issue, but am unsure of how to resolve it short of switching to a different, more absolute value (px).

The issue is that I change the base font size across my site by doing the following:

html {
  font-size: 62.5%; // Scales 1 rem unit to 10px
}

The responsive typography calc seems to not account for this global font-size change causing it to jump when hitting the min/max value.

I can work around this by using px values for responsive text, but it would be nice if there was some way to be able to have smooth responsive typography while using rems on a site that modifies the base font-size.

For reference, here is a code example of responsive typography working and not working:

// Does NOT Scale Correctly
h1 {
    font-size: responsive 4rem 6.8rem;
    font-range: 420px 1280px;
}

// Scales Correctly
h1 {
    font-size: responsive 40px 68px;
    font-range: 420px 1280px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant