Currently, the computed value for border-width properties is defined to "absolute length, snapped as a border width".
This has an unfortunate interaction with the zoom property, where pixel snapping will not be preserved for most values of zoom (as zoom is applied after computed value).
If instead, we move the application of "snapped as a border width" to the used value, I believe this would be resolved.
I say I think, because I am not exactly sure when zoom gets applied, the spec says:
"the used value of a CSS property (including values inside of path() strings) is pre-multiplied (before any other steps in the used value stage) by the used value of zoom for the element".
The goal here would be for the order to be
- Apply
zoom
- Apply "snapped as a border width".
The only other user visible change here would be when explicitly inheriting border-widths by a child with a different zoom value, as the non-pixel snapped value will now be inherited, which I think would be preferable anyway.
Currently, the computed value for
border-widthproperties is defined to "absolute length, snapped as a border width".This has an unfortunate interaction with the
zoomproperty, where pixel snapping will not be preserved for most values ofzoom(aszoomis applied after computed value).If instead, we move the application of "snapped as a border width" to the used value, I believe this would be resolved.
I say I think, because I am not exactly sure when
zoomgets applied, the spec says:The goal here would be for the order to be
zoomThe only other user visible change here would be when explicitly inheriting border-widths by a child with a different
zoomvalue, as the non-pixel snapped value will now be inherited, which I think would be preferable anyway.