Discourse CSS, is perhaps not as simple as it might be.
SCSS gets compiled into CSS which IMHO is a good thing that helps to reduce redundant declarations. This Theme deals specifically and solely with CSS intended to increase font size.
One complicating factor is that existing font-size declarations have different length units. Some are pixels, others percentage and others em. I have a personal dislike of using pixels for font size and therefore am using em units
A problem with calculated values is that they are based on parent elements. i.e. the Cascading of CSS. Thus a change in one place can affect the display of other content, at times, less than ideally.
Another concern with CSS is specificty, selectors may be eg. elements, classes, ids, etc. Higher specificity selectors “win out” over lower specificity selectors. I have a personal dislike of using !important and have avoided using it to override higher specificity selectors
The Theme CSS so far uses only the arbitrary declaration font-size: 1.2em;
My thought being that a 20% increase over the normal font-size would meet vision related accessibility guidelines.
I will be exploring the “nooks and crannies” of Discourse in hopes of finding anything I may have missed, but I welcome comments and any “heads up” from others regarding the Theme which can be found at
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
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.
@sam, sorry for this dump, I see that here on meta we’ve got a “large fonts” theme, can you please upload that theme to your github so other users can use it? Is it possible?
But… noobs like me that only know to import themes could need that “theme”
The same theme that everyone could use and see here on meta.
That would be awesome