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
UnoCss does not generate pseudo rule #2371
Comments
We temporarily close this due to the lack of enough information. |
This is not how I got it working in this Playground. But it's super weird and verbose. /cc @chu121su12 @antfu |
You can return an array to provide multiple rules: Playground For pesudo selector it's indeed a bit tricky but for UnoCSS take more static approach for performance. No plan to have runtime utils like addUtilities or addVariant that alter the generator's behavior. |
This is cool, but it has some issues: Playground
<div class="hover:hide-scroll-bar"></div>
In my first Playground these are not an issue.
I don't propose having these utilities on UnoCSS core, but if we can come up with a more structured format for this uses cases we can provide a high level utility in preset-mini for end-users, similar to |
Depending on the pseudo usage afterwards, for multiple matching, one workaround I could think is by using shortcut |
@chu121su12 Good one, but hover variant placed on wrong side in your workaround. This is a regression caused by #2190. Maybe we should bring back |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
UnoCSS version
0.50.6
Describe the bug
UnoCss failed to resolve rules. For example:
Rules:
Expected output:
.hide-scroll-bar
and.hide-scroll-bar::-webkit-scrollbar
should be created.Actual:
Only
.hide-scroll-bar
was created.Reproduction
hide-scroll-bar.mp4
System Info
No response
Validations
The text was updated successfully, but these errors were encountered: