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
feat(core)!: make select pseudo elements not to be moved around #2190
Conversation
✅ Deploy Preview for unocss ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good. But it turns out at the moment that no matter whether movePseudoElementsEnd
is used or not pseudo-elements are always at the end of the selector. This is a regression that happened at some point. Unfortunately, current test is only testing movePseudoElementsEnd
function. I did that to be sure pseudo-elements properly moved even in extreme cases.
First of all, we have to figure out what causing all pseudo-elements to be moved end of the selector.
Given that input:
<input type="file" class="dark:hover:file:bg-red-600">
<input type="file" class="dark:file:hover:bg-red-600">
it should generate these selectors:
.dark .dark\:file\:hover\:bg-red-600:hover::file-selector-button{...}
.dark .dark\:file\:hover\:bg-red-600::file-selector-button:hover{...}
but it generated this:
.dark .dark\:file\:hover\:bg-red-600:hover::file-selector-button{...}
.dark .dark\:file\:hover\:bg-red-600:hover::file-selector-button{...}
Playgrounds
Deploy Preview Playground - ❌
Tailwind Playground - ✔
I tested the state of the repository before #987. It applies :hover
and ::file-selector-button
in a different order as expected, but in the wrong order which later is fixed by #987. Generating pseudo-elements at the end of the selector is not normal even if we remove movePseudoElementsEnd
. We have to address what caused this problem.
@chu121su12 I ran |
Thanks for your work @chu121su12, I fixed the issue and ditched |
Alternative to #2174