W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2020

Re: [csswg-drafts] [css-pseudo] Please change the behavior of :focus-within (#5654)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Sun, 25 Oct 2020 17:08:49 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-716179614-1603645728-sysbot+gh@w3.org>
More specific to your usecase,
 - If your `list-view-item` is not focusable, it doesn't matter whether `:focus-within` includes `:focus` or not.
 - So I'm assuming that it's focusable. Then you should be able to use `list-view-item:active:focus` to achieve the behavior that you want.
 - If you don't know whether the `list-view-item` will be focusable or not, then

    list-view-item:active:is(:focus, :not(:focus-within))

It may not seem ideal in your case but most times that I use `:focus-within` I do want to include `:focus`.

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 25 October 2020 17:08:51 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:21 UTC