w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.5k stars 661 forks source link

[css-values] Relative length units for stroke widths #838

Open Crissov opened 7 years ago

Crissov commented 7 years ago

As mentioned before in #459 and #239, I believe that it would be useful to have additional relative length units to refer to the nominal width or thickness of strokes in the glyphs of a font.

The exact names, definitions and abbreviations are of course open to discussion. I used to favor bs and hs or ds and us, but the s standing in for stroke may be too reminiscent of the one in s ‘second’ and ms ‘millisecond’.

tabatkins commented 6 years ago

Per usual, can you give actual use-cases for this? Pages where, if you had this unit, it would enable you to do something that you currently can't do, or can only do with great effort/hackery?

Crissov commented 6 years ago

The use case from #459 and #239 is setting the position or thickness of underlines etc.

Crissov commented 4 years ago

If that remained the only valid use case, though, and authors were expected to only ever use 1bs and 1hs, respective keywords would work just fine as well.