Šime Vidas on Nostr: `font-size: small` can be smaller than `font-size: smaller`. Both values make the ...
`font-size: small` can be smaller than `font-size: smaller`. Both values make the font-size smaller by a similar amount, but `small` is calculated relative to 1rem, while `smaller` is relative to 1em.
So if you’re in a heading where 1em is significantly larger than 1rem, `small` will be smaller than `smaller`.
Correction: `small` is relative to the user’s preferred font size directly. Changing the value of 1rem does not change `small`.
Published at
2025-08-08 00:46:33 UTCEvent JSON
{
"id": "a640d93019e0fc1d9621261a5a65168a1f4f06efe9222c1f10104a636a5ebaa4",
"pubkey": "9dbc8c0b29d485edca86e40325252b5884df4b056beba2c84e73d0ce2bc499ff",
"created_at": 1754613993,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/@simevidas/114990382667370845",
"web"
],
[
"proxy",
"https://mastodon.social/users/simevidas/statuses/114990382667370845",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://mastodon.social/users/simevidas/statuses/114990382667370845",
"pink.momostr"
],
[
"-"
]
],
"content": "`font-size: small` can be smaller than `font-size: smaller`. Both values make the font-size smaller by a similar amount, but `small` is calculated relative to 1rem, while `smaller` is relative to 1em.\n\nSo if you’re in a heading where 1em is significantly larger than 1rem, `small` will be smaller than `smaller`.\n\nCorrection: `small` is relative to the user’s preferred font size directly. Changing the value of 1rem does not change `small`.",
"sig": "cdff3679ed92eb00b76acaaa436b2f3434fe52b8fe8bae5f1409a8dc366d1338fe285a52d4b611e0db398e9ed42c23c429d11d57cb65abc385f1d6641aa418eb"
}