Open smfr opened 3 years ago
Added note: smfr suggested making it relative to font-size
(as we're doing in letter-spacing etc.) since that might actually be useful.
Note that "in CSS" isn't the discriminator here; SVG already defines what %s mean in CSS (and you can't use %s in the attributes anyway).
We could have a different definition for it in non-SVG elements, or we could just try and change the definition wholesale (since % sizing on stroke-width properties is probably rarely-used?).
The CSS Working Group just discussed [fill-stroke-3] Should % stroke widths be relative to the viewport for CSS?
, and agreed to the following:
RESOLVED: CSS stroke-width on text will resolve percentages against computed font-size
We also decided to investigate whether this can be extended to SVG. Marking Needs Data for that.
fill-stroke-3 says that stroke-width is relative to scaled viewport size without a normative reference for what that means in CSS.
Perhaps, if we want to use viewport size, it should use the same dimensions that are used for viewport units?
Alternatively, perhaps in CSS % in stroke-width should be relative to something else?