W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2018

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

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Wed, 14 Nov 2018 23:02:05 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-438851770-1542236523-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:39 UTC