Intent to prototype and ship: Untangle computed values of border / outline / column-rule widths and style

72 views
Skip to first unread message

Emilio Cobos Álvarez

unread,
Nov 6, 2025, 4:01:35 AM (5 days ago) Nov 6
to dev-pl...@mozilla.org, Kevin Babbitt
In bug 1998285 I'm planning to land a change to adopt the CSS resolution from https://github.com/w3c/csswg-drafts/issues/11494 to untangle the computed values of some properties. I plan to land this for 147 (so, not this week).

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



Kevin Babbitt

unread,
Nov 6, 2025, 6:45:48 PM (5 days ago) Nov 6
to Emilio Cobos Álvarez, dev-pl...@mozilla.org, Sam Davis Omekara

Thanks Emilio. Adding Sam Davis who did the implementation in Blink.

 

We discussed this on a call with Ian Kilpatrick today, and we think this is shippable in Blink, modulo the inherit bug you mentioned.

 

Kevin

Sam Davis Omekara

unread,
Nov 6, 2025, 7:14:00 PM (5 days ago) Nov 6
to Kevin Babbitt, Emilio Cobos Álvarez, dev-pl...@mozilla.org
Thanks for the tag. As Kevin mentioned, aside from the inherit bug on the Blink side, we should be good to proceed with shipping.

From: Kevin Babbitt <kbab...@microsoft.com>
Sent: Thursday, November 6, 2025 3:41 PM
To: Emilio Cobos Álvarez <emi...@mozilla.com>; dev-pl...@mozilla.org <dev-pl...@mozilla.org>; Sam Davis Omekara <samome...@microsoft.com>
Subject: RE: [EXTERNAL] Intent to prototype and ship: Untangle computed values of border / outline / column-rule widths and style
 
Reply all
Reply to author
Forward
0 new messages