Re: [csswg-drafts] [css-display][css-aam][selectors-4] How elements with `display:contents` get focused?

Wow, ok, so my conclusion about all this is the following:

- Elements that have 'display: contents' can still be focused (e.g. through Element.focus()), and will be selected by the `:focus` selector, as usual. I think the specs are clear about this.
- Whether a particular user interaction focuses the element is undefined and up to the UA and can depend on the type of interaction. However, to the extent that interacting with a descendant of the element would normally focus the element even if their respective boxes were disjoint, it should be focused.
- Backgrounds and borders definitely do not apply to elements that have 'display: contents' as there is no box for them to apply to.
- Whether 'outline' can apply to 'display: contents' elements is an interesting open question, because 'outline' is defined to be able to draw around descendants, not just the box itself. So the outline can exist without the element's own box existing. We should probably file this as a separate issue against css-uiƗcss-display.

Is there anything else I missed here?

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

Received on Wednesday, 14 November 2018 23:02:07 UTC