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

Use pixels for @media queries #277

Merged
merged 1 commit into from
Aug 5, 2023

Conversation

jonathanhefner
Copy link
Member

These @media queries are concerned with displaying a side panel that is explicitly 300px wide. Therefore, they should be expressed in terms of pixels instead of variable-width units. Also note that em in a @media query is based on the default font size of the browser configured by the user, not the font size of <body>, which seems to have been the intention with these (40 * 15px == 600px => equal space for panel and content).

These `@media` queries are concerned with displaying a side panel that
is explicitly 300px wide.  Therefore, they should be expressed in terms
of pixels instead of variable-width units.  Also note that `em` in a
`@media` query is based on the default font size of the browser
configured by the user, _not_ the font size of `<body>`, which seems to
have been the intention with these (40 * 15px == 600px => equal space
for panel and content).
@jonathanhefner jonathanhefner merged commit 123a26f into rails:main Aug 5, 2023
10 checks passed
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.

1 participant