Weekly digest
Three new comments and one request for review.
rem grows with the user's font size; px stays put.
Josh W. Comeaujoshwcomeau.comWhen picking between pixels and rems, here's the question you should be asking yourself: Should this value scale up as the user increases their browser's default font size?
Josh W. Comeaujoshwcomeau.comI recommend using rems for media queries. It means that users who crank up their default font size will see the "mobile" view even on a desktop computer, but this is generally a better user experience than a super-crowded desktop layout with huge text.
Raise the browser font size to 32px.
Three new comments and one request for review.
font-size: 14pxComputed14pxThree new comments and one request for review.
font-size: 0.875remComputed14px.card { font-size: 0.875rem; padding: 1rem; } /* grows */
.card { border: 1px solid; } /* hairline stays 1px */
Set the font size to 32px, then change the window width.
Start free and upgrade when you need more.
Share one workspace across your company.
@media (min-width: 360px)Start free and upgrade when you need more.
Share one workspace across your company.
@media (min-width: 22.5rem)@media (min-width: 22.5rem) { /* 360px at 16px, 720px at 32px */
.cols { grid-template-columns: 1fr 1fr; }
}
Users who raise their default font size are asking for bigger everything. px text ignores that request.