Re: [csswg-drafts] [css-ui] Clarify scope of implementation-defined behavior for native appearance (and primitive appearance) (#9919)

Border widths are not returned as used values in `getComputedStyle()`, so if border widths differ between specified style and used style, the actual layout and the values given by `getComputedStyle()` don't match.

Border width affects the used value of `height` here because form controls have `box-sizing: border-box` in the UA stylesheet: https://html.spec.whatwg.org/multipage/rendering.html#form-controls

This is the current situation in WebKit, if I understand correctly.

Demo: https://software.hixie.ch/utilities/js/live-dom-viewer/saved/12396

I think the options for WebKit are, to conform to the WG resolution:

1. Change from setting computed value to used value for the border. This will make `getComputedStyle()` values not match up with the actual layout.
2. Let the used value for `border-width` be 2px. This will change the actual layout for native appearance (but the visual border can be painted the same as today).

Both of these have non-zero web compat risk. Option 2 I think matches Chromium and Gecko and seems less confusing for authors.

-- 
GitHub Notification of comment by zcorpan
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9919#issuecomment-1956146512 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 21 February 2024 08:41:29 UTC