[csswg-drafts] [css-ui] `outline-style` should work for both UA and author values around anonymous block boxes (#10293)

davidleininger has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-ui] `outline-style` should work for both UA and author values around anonymous block boxes ==
When an `inline` element is the parent of `block` level elements there is an issue with outlines having an inconsistent behavior between UA and author-created values. I believe that this is based on how inline elements work with [anonymous blocks](https://www.w3.org/TR/CSS22/visuren.html#anonymous-block-level).

In this case, `outline-style` is set to anything other than [`auto`](https://drafts.csswg.org/css-ui/#outline-style) the outline isn’t visible when assigned, whether it’s on focus or not. This is because user-authored styles only apply to the anonymous boxes, whereas the UA styles apply to the whole inline element. See this [codepen demo](https://codepen.io/davidleininger/pen/XWQLxZy/8ec4fcf01235a1a22e7ee2e7b5f17a64) to see the difference. As expected, setting the `inline` element to `inline-block` also fixes the issue outline visibility issue, but there are times when the author might not have the ability to edit that.

I believe that author-created values should have the same behavior as UA, in that users should be able to set the `outline-color` and `outline-style`.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10293 using your GitHub account


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

Received on Wednesday, 8 May 2024 15:27:31 UTC