- From: Bramus via GitHub <noreply@w3.org>
- Date: Mon, 11 Aug 2025 11:46:21 +0000
- To: public-css-archive@w3.org
You can solve it by applying the `anchor-name: --x` onto `.selected` only when its parent `.action-bar` does not have a `:hover, :focus`.
```css
.action-bar:not(.action-bar:has(> button:hover, > button:focus)) .selected,
.action-bar > button:hover,
.action-bar > button:selected {
anchor-name: --x;
}
```
That said, the suggested extension to `position-anchor` seems like a good addition.
One question though: wouldn’t this be covered by [`first-valid()`](https://drafts.csswg.org/css-values-5/#first-valid)?
--
GitHub Notification of comment by bramus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12576#issuecomment-3174427868 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 11 August 2025 11:46:22 UTC