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

avoid rem in media queries #226

Merged
merged 2 commits into from
Nov 22, 2023
Merged

avoid rem in media queries #226

merged 2 commits into from
Nov 22, 2023

Conversation

mbostock
Copy link
Member

Ref. https://www.w3.org/TR/mediaqueries-4/#units

Relative length units in media queries are based on the initial value, which means that units are never based on results of declarations. For example, in HTML, the em unit is relative to the initial value of font-size, defined by the user agent or the user’s preferences, not any styling on the page.

So instead of rem this now uses multiples of 17px which is our equivalent.

@mbostock mbostock requested a review from cinxmo November 22, 2023 14:54
@Fil Fil enabled auto-merge (squash) November 22, 2023 17:06
@Fil Fil merged commit 0c0c358 into main Nov 22, 2023
1 check passed
@Fil Fil deleted the mbostock/no-rem-media branch November 22, 2023 17:07
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

Successfully merging this pull request may close these issues.

3 participants