Discourse Larger Font Theme

That’s what I meant by “based on parent elements” and “cascade”, but I do think “stack” describes the problem with using them better.

Don’t think I’m totally against using pixel units. It’s just that I prefer to use them for things like thin borders. Most other uses they always seem more like “magic numbers”, i.e. they look good when seen under the same circumstances under which they were designed, but they don’t always hold up so well depending on browser settings.

Hmmm. I think rem units (they don’t stack) might be a better choice. Called “compounding” here

font-size CSS property - CSS | MDN

Rems
rem values were invented in order to sidestep the compounding problem. rem values are relative to the root html element, not the parent element. In other words, it lets you specify a font size in a relative fashion without being affected by the size of the parent, thereby eliminating compounding.

Good support, but some known issues

3 « J'aime »