Menu

A reader who sets their browser font to Very Large gets a smaller headline on our homepage than one who sets it to Large
📰

A reader who sets their browser font to Very Large gets a smaller headline on our homepage than one who sets it to Large

DEV Community: css·Daniel Pertu·13 days ago
#vfXceemV
#devtocss#devto#dev#font#size
Reading 0:00
15s threshold

Chrome has a font size setting. Settings, Appearance, Font size, with Medium at 16px, Large at 20px, Very Large at 24px, and a slider under "Customise fonts" that goes further. It is not zoom. Zoom scales pixels and rems together and keeps your layout intact. The font size setting changes the browser's default font size, which is a different thing, and it does something to a Tailwind site that we did not expect.

We measured our homepage and a guide page at four default font sizes in a window 1512 CSS pixels wide, which is a wide desktop window at every one of them.

The breakpoints move

sm = min-width: 40rem md = min-width: 48rem lg = min-width: 64rem xl = min-width: 80rem

Enter fullscreen mode

Exit fullscreen mode

Those are Tailwind's defaults and they are what our markup is written against. In a media query, rem resolves against the browser's default font size, not against whatever :root computes to.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.