-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Upgrade lightningcss
to 1.29.0
#15576
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ | |
"packageManager": "[email protected]", | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"lightningcss@1.26.0": "patches/lightningcss@1.26.0.patch", | ||
"lightningcss@1.29.0": "patches/lightningcss@1.29.0.patch", | ||
"@parcel/[email protected]": "patches/@[email protected]" | ||
} | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -205,7 +205,7 @@ summary { | |
ol, | ||
ul, | ||
menu { | ||
list-style: none; | ||
list-style-type: none; | ||
} | ||
|
||
/* | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6839,53 +6839,26 @@ test('color-scheme', async () => { | |
]), | ||
).toMatchInlineSnapshot(` | ||
".scheme-dark { | ||
--lightningcss-light: ; | ||
--lightningcss-dark: initial; | ||
--lightningcss-light: ; | ||
--lightningcss-dark: initial; | ||
Comment on lines
-6842
to
-6845
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. 😍 |
||
color-scheme: dark; | ||
} | ||
|
||
.scheme-light { | ||
--lightningcss-light: initial; | ||
--lightningcss-dark: ; | ||
--lightningcss-light: initial; | ||
--lightningcss-dark: ; | ||
color-scheme: light; | ||
} | ||
|
||
.scheme-light-dark { | ||
--lightningcss-light: initial; | ||
--lightningcss-dark: ; | ||
--lightningcss-light: initial; | ||
--lightningcss-dark: ; | ||
color-scheme: light dark; | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
.scheme-light-dark { | ||
--lightningcss-light: ; | ||
--lightningcss-dark: initial; | ||
} | ||
} | ||
|
||
.scheme-normal { | ||
color-scheme: normal; | ||
} | ||
|
||
.scheme-only-dark { | ||
--lightningcss-light: ; | ||
--lightningcss-dark: initial; | ||
--lightningcss-light: ; | ||
--lightningcss-dark: initial; | ||
color-scheme: dark only; | ||
} | ||
|
||
.scheme-only-light { | ||
--lightningcss-light: initial; | ||
--lightningcss-dark: ; | ||
--lightningcss-light: initial; | ||
--lightningcss-dark: ; | ||
color-scheme: light only; | ||
}" | ||
`) | ||
|
@@ -14376,7 +14349,7 @@ test('transition', async () => { | |
} | ||
|
||
.transition { | ||
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, -webkit-backdrop-filter, -webkit-backdrop-filter, backdrop-filter; | ||
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter; | ||
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. Wew, finally! |
||
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); | ||
transition-duration: var(--tw-duration, var(--default-transition-duration)); | ||
} | ||
|
@@ -14443,7 +14416,7 @@ test('transition', async () => { | |
} | ||
|
||
.transition { | ||
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, -webkit-backdrop-filter, -webkit-backdrop-filter, backdrop-filter; | ||
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter; | ||
transition-timing-function: var(--tw-ease, ease); | ||
transition-duration: var(--tw-duration, .1s); | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I wonder if this is enough. The
list-style: none;
expands to:So if another stylesheet sets the
list-style-position
orlist-style-image
to something else then this would be a breaking change technically.However, I think our main goal was to use
list-style-type: none;
in the first place to get rid of the visual dot/number.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.
@RobinMalfait Not sure I understand, preflight is for normalizing user-agent styling and there
initial
is the default anyways, right? Any other stylesheets that could change this are probably in a different layer/unlyaered so they'd take presedence or am I missing somehting?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.
I just wanted to be 100% sure that this is the correct fix without causing other (subtle) issues since the computed styles would be different.
I think a lot of people will use
@layer base
for their preflight resets as well. I was trying to come up with an example where this change would not be enough/cause issues. E.g.:If the setup looks like this:
If you then inspect a

ul
on the page, before this change, the styles would look like:After this change, the styles would look like:

So while there is a difference in the computed values (the
list-style-image
is gone) I don't think there is an actual issue. I was trying to come up with an example where this wouldn't be the case but couldn't find any so far (which is good 😄)Uh oh!
There was an error while loading. Please reload this page.
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.
Actually, it's just the devtools that hide the
list-style-image
,window.getComputedStyle()
does have anone
value forlist-style-image
.Uh oh!
There was an error while loading. Please reload this page.
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.
Hmm I think it would only be an issue if the initial CSS looks like this, right?
i.e. the overwrite comes before our resets. However, that also meant you had CSS in there before that was overwritten anyways so chances are that they'd have reordered this already otherwise this has had no effects I think?