Weekly digest
Three new comments and one request for review.
Updated 2 min agoLeave html alone and size from rem, so the browser setting still works.
Paco Courseypaco.mealmost all websites do not respect browser scaling , because they set a hard-coded font-size on html , or use px which opts out of scaling entirely
Paco Courseypaco.mescaling (browser settings) and zooming (⌘+/-) are different things
Zoom scales px too; the font-size setting only reaches rem and em.
Change the browser font size. Only one pane follows.
Three new comments and one request for review.
Updated 2 min agohtml { font-size: 16px }Root16pxThree new comments and one request for review.
Updated 2 min agohtml { font-size: 100% }Root20pxhtml { font-size: 16px; } /* bad: ignores the setting */
html { font-size: 100%; } /* good: or leave it out */
.card { font-size: 1rem; padding: 1em; } /* follows the root */
h3 { font-size: 1.25em; }
Drag the zoom. Then change the font size above.
Three new comments and one request for review.
zoom: 1Border3pxThree new comments and one request for review.
html { font-size: 100% }Border3px// Read the browser's default: "medium" ignores any px on html
const probe = document.createElement("div");
probe.style.fontSize = "medium";
document.body.append(probe);
getComputedStyle(probe).fontSize; // "20px" when set to Large
probe.remove();
A px value on html replaces the size your reader picked, for every rem on the page.