It's not a major feature, but since it's a behavior change from CSS2 I thought it was probably worth a PSA / following the intent process.
What this means is that border-*/column-rule/outline-style: none (or hidden) won't cause the relevant width to become 0px at computed-value time. Rendering will keep obviously not drawing the border / outline / column-rule.
This is more consistent with all the other CSS properties, and allows us to evolve these properties better in the future (doing work on gap decorations is what prompted this). Behavior changes are:
- border-*/column-rule/outline-width: inherit will stop inheriting 0px if the parent style is none/hidden.
- getComputedStyle() for outline-width / column-rule-width will stop returning 0px when the relevant style is 0px. This could be fixed by doing the same resolved-value computation as borders, but outlines and column rules don't affect layout and it's better to avoid getComputedStyle() and the actual style diverging if we can.
Note that getComputedStyle() for outline-width is already not super reliable because of outline-style: auto. getComputedStyle() behavior for borders is maintained for compat.
Platform coverage: all
Preference: it's somewhat non-trivial to put behind a pref, and I don't think the risk is high enough to do it, but lmk if you disagree.
DevTools bug: N/A
Link to standards-positions discussion: N/A (relatively minor change, though we're
positive on gap-decorations)
Other browsers:
- Blink: Implemented, though not sure about shipping timeline (maybe Kevin, cc'd, can elaborate on it). Note that they have a bug with inheritance that I found while looking into this, for which tests will be adjusted and fixed.
- WebKit: No implementation yet, but were positive in the relevant discussion.
web-platform-tests: Variety of tests cover this:
- css/css-backgrounds/animations/border-width-interpolation.html
- css/CSS2/ui/outline-width-096.xht
- css/CSS2/borders/border-width-011.xht
- css/CSS2/borders/border-width-012.xht
- css/css-ui/parsing/outline-width-computed.html
- css/css-ui/outline-009.html
- css/css-ui/animation/outline-width-interpolation.html
- css/css-multicol/parsing/column-rule-width-computed.html
- css/css-multicol/parsing/column-rule-computed.html
- css/css-backgrounds/animations/border-width-interpolation.html
Thanks,
-- Emilio