Playground
Input:
code{fony-family:monospace,monospace}
Output (incorrect, changes rendering in most browsers):
code{fony-family:monospace}
Not sure what’s going on? It’s a stupid piece of historical baggage in browsers: monospace, when it’s the only font in the family stack, defaults to probably 13px, when all other text is probably 16px. Can’t find this behaviour in any spec, but everyone’s done it since the very beginning. The whole thing was a mistake in my opinion, and people often work around it with font-size: 1em (or their own size that probably isn’t 81.25%), but I suspect a lot of developers don’t know about it any more because most people use longer font-family declarations (for better or normally for worse).
Well, I like to fix it with font-family: monospace, monospace, which is the only correct way of resolving it within font-family alone (as any other font name could theoretically alter the rendering, if the monospace face is missing a character and the provided name maps to a face other than the default face and which has it).
Unfortunately Lightning CSS removes the duplication. It shouldn’t, specifically if it’s monospace and this would reduce the list to one member.
I don’t know of this idiosyncrasy of font-family affecting anything else, but it conceivably could.
Playground
Input:
Output (incorrect, changes rendering in most browsers):
Not sure what’s going on? It’s a stupid piece of historical baggage in browsers:
monospace, when it’s the only font in the family stack, defaults to probably 13px, when all other text is probably 16px. Can’t find this behaviour in any spec, but everyone’s done it since the very beginning. The whole thing was a mistake in my opinion, and people often work around it withfont-size: 1em(or their own size that probably isn’t 81.25%), but I suspect a lot of developers don’t know about it any more because most people use longerfont-familydeclarations (for better or normally for worse).Well, I like to fix it with
font-family: monospace, monospace, which is the only correct way of resolving it withinfont-familyalone (as any other font name could theoretically alter the rendering, if themonospaceface is missing a character and the provided name maps to a face other than the default face and which has it).Unfortunately Lightning CSS removes the duplication. It shouldn’t, specifically if it’s
monospaceand this would reduce the list to one member.I don’t know of this idiosyncrasy of
font-familyaffecting anything else, but it conceivably could.