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

Use :is to make important selector option insensitive to DOM order #10835

Merged
merged 7 commits into from
Mar 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update tests
RobinMalfait committed Mar 21, 2023

Verified

This commit was signed with the committer’s verified signature.
RobinMalfait Robin Malfait
commit 1b92cb48b33e4f81831183c3e12257cb9a91d82d
7 changes: 5 additions & 2 deletions tests/important-selector.test.js
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ crosscheck(({ stable, oxide }) => {
<div class="dark:focus:text-left"></div>
<div class="group-hover:focus-within:text-left"></div>
<div class="rtl:active:text-center"></div>
<div class="dark:before:bg-black"></div>
<div class="dark:before:underline"></div>
`,
},
],
@@ -143,6 +143,10 @@ crosscheck(({ stable, oxide }) => {
text-align: center;
}
}
#app :is(.dark .dark\:before\:underline):before {
content: var(--tw-content);
text-decoration-line: underline;
}
#app :is(:is(.dark .dark\:focus\:text-left:focus)) {
text-align: left;
}
@@ -174,7 +178,6 @@ crosscheck(({ stable, oxide }) => {
`

return run(input, config).then((result) => {
console.log(result.css)
stable.expect(result.css).toMatchFormattedCss(css`
${defaults}
#app :is(.dark .dark\:before\:bg-black)::before {