Skip to content

feat(css): Update computed for border/column-rule/outline-width, outline-offset#1069

Draft
sb3nder wants to merge 1 commit intomdn:mainfrom
sb3nder:computed-border-width
Draft

feat(css): Update computed for border/column-rule/outline-width, outline-offset#1069
sb3nder wants to merge 1 commit intomdn:mainfrom
sb3nder:computed-border-width

Conversation

@sb3nder
Copy link
Copy Markdown
Contributor

@sb3nder sb3nder commented May 9, 2026

Description

This PR updates the computed value for border-*-width, column-rule-width, outline-width, outline-offset, -webkit-border-*-width, to "the absolute length, snapped as a line width".

Motivation

Additional details

border-*-width, column-rule-width, outline-width snapped as a line width:
w3c/csswg-drafts#5210

Computed value untangled from *-style properties value:
w3c/csswg-drafts#11494 (comment)

outline-offset snapped as a line width:
w3c/csswg-drafts#12906

Definition of "length snapped as a line width":
w3c/csswg-drafts@c196082

Related issues and pull requests

TODO:
We need a doc link to explain "snapped as a line width", I will open an issue/pr in mdn/content.

Understand if I can add <line-width> to types.json, to make a page.

Maybe we need the translations for the computed value and link title attribute:

the absolute length, snapped as a line width

To snap a <length> len as a line width:

  1. If len is an integer number of device pixels, leave it as is.
  2. If the absolute value of len is greater than zero, but less than 1 device pixel, round it away from zero to ±1 device pixel.
  3. If the absolute value of len is greater than 1 device pixel, round it towards zero to the nearest integer number of device pixels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant