- From: Miriam Suzanne via GitHub <noreply@w3.org>
- Date: Tue, 14 Oct 2025 20:57:59 +0000
- To: public-css-archive@w3.org
@ZoeBijl This doesn't currently propose a way to group selectors with at-rules, no. This would be…
```css
@mixin --visually-hidden {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
clip-path: inset(50%);
white-space: nowrap;
}
.visually-hidden:not(:focus):not(:active) {
@apply --visually-hidden;
}
```
or, to always exclude focus/active when hiding:
```css
@mixin --visually-hidden {
&:not(:focus):not(:active) {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
clip-path: inset(50%);
white-space: nowrap;
}
}
.visually-hidden { @apply --visually-hidden; }
```
--
GitHub Notification of comment by mirisuzanne
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9350#issuecomment-3403593291 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 14 October 2025 20:58:00 UTC