3 ms·
wow, thanks a lot for this! i'll look into it later - i didn't know that you could specify character width with the max-width param. neat!
by j3s 4y ago
wow, thanks a lot for this! i'll look into it later - i didn't know that you could specify character width with the max-width param. neat!
- chrismorgan 4y agoRelevant reading: https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_.... The ch unit is the width of the 0 glyph, which for monospace fonts means the width of all regular-sized glyphs. The story of what it actually calculates gets a bit messier if you use a font-family stack with more than one item, but that’s no problem for what you’ve done. There are genuine uses for all three of em, ex and ch (though ex is the rarest by far). And hey, another fun tip: you can add U+FE0E after emoji to prefer monochrome textual rather than graphical representations (and U+FE0F says “go graphical”, useful for the comparatively few emoji that default to a textual representation). It’s not perfect, and it may end up feeling less pleasant than the greyscale-filtered graphical representation, but hey, it’s a fun feature.