-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix: wrap :id, :where:not and :has with :global during migration
#13850
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
Changes from 2 commits
091f02c
4774d10
276ba98
897d429
d18fd1b
13f52cd
24fafc3
ce53bd6
68f71c9
60fb2b5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| 'svelte': minor | ||
| --- | ||
|
|
||
| feat: migrate css `:id`, `:where``:not` and `:has` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| <script> | ||
| function is(){} | ||
| function where(){} | ||
| function not(){} | ||
| function has(){} | ||
| // looks like css but it's not in style tag | ||
| const x = { | ||
| div:is(42), | ||
| span:where(42), | ||
| form:not(42), | ||
| input:has(42), | ||
| } | ||
| </script> | ||
|
|
||
| what if i'm talking about `:has()` in my blog? | ||
|
|
||
| ```css | ||
| :has(.is_cool) | ||
| ``` | ||
|
|
||
| <style lang="postcss"> | ||
| div:has(span){} | ||
| div > :not(span){} | ||
| div > :is(span){} | ||
| div > :where(span){} | ||
| div:has(:is(span)){} | ||
| div > :not(:is(span)){} | ||
| div > :is(:is(span)){} | ||
| div > :where(:is(span)){} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just for safety: can we add more tests around nested braces? Like
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure...if you can think of any other case please let me know
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I know why...let me fix |
||
| div{ | ||
| p:has(&){ | ||
| } | ||
| :not(span > *){ | ||
| :where(form){} | ||
| } | ||
| } | ||
| </style> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| <script> | ||
| function is(){} | ||
| function where(){} | ||
| function not(){} | ||
| function has(){} | ||
|
|
||
| // looks like css but it's not in style tag | ||
| const x = { | ||
| div:is(42), | ||
| span:where(42), | ||
| form:not(42), | ||
| input:has(42), | ||
| } | ||
| </script> | ||
|
|
||
| what if i'm talking about `:has()` in my blog? | ||
|
|
||
| ```css | ||
| :has(.is_cool) | ||
| ``` | ||
|
|
||
| <style lang="postcss"> | ||
| div:has(:global(span)){} | ||
| div > :not(:global(span)){} | ||
| div > :is(:global(span)){} | ||
| div > :where(:global(span)){} | ||
|
|
||
| div:has(:global(:is(span))){} | ||
| div > :not(:global(:is(span))){} | ||
| div > :is(:global(:is(span))){} | ||
| div > :where(:global(:is(span))){} | ||
|
|
||
| div{ | ||
| p:has(:global(&)){ | ||
|
|
||
| } | ||
| :not(:global(span > *)){ | ||
| :where(:global(form)){} | ||
| } | ||
| } | ||
| </style> |
Uh oh!
There was an error while loading. Please reload this page.