Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore comment to prevent CSS generation (or negate :not(:focus)) #122

Open
Sjeiti opened this issue Jun 28, 2024 · 0 comments
Open

Ignore comment to prevent CSS generation (or negate :not(:focus)) #122

Sjeiti opened this issue Jun 28, 2024 · 0 comments

Comments

@Sjeiti
Copy link

Sjeiti commented Jun 28, 2024

We have an element that uses a :not(:focus) rule with visually-hidden styling.
This works fine in production but in Storybook the rules are almost always applied.

I was hoping v3.1.1 would fix it, but it made the issue even harder to work around. Prior we had one additional rule, now we have two: :not(:focus), :not(.pseudo-focus), :not(.pseudo-focus-all *).
This means to test this element not having the rules applied we have to add .pseudo-focus-all to a parent, .pseudo-focus to the element itself, as well as actually focussing the element.

Is there a way to ignore some CSS? (and not add the extra rules)
Maybe something like:

:not(:focus) {
	/* pseudo-state-ignore */
	@include visually-hidden;
}

thanks

Ron

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant