Skip to content

fix: should not panic when passing system-color to color-mix#819

Merged
devongovett merged 1 commit intoparcel-bundler:masterfrom
inottn:fix/color-mix
Nov 3, 2024
Merged

fix: should not panic when passing system-color to color-mix#819
devongovett merged 1 commit intoparcel-bundler:masterfrom
inottn:fix/color-mix

Conversation

@inottn
Copy link
Contributor

@inottn inottn commented Sep 27, 2024

if matches!(self, CssColor::CurrentColor | CssColor::System(..))
|| matches!(other, CssColor::CurrentColor | CssColor::System(..))
{
return Err(());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean you get an error instead of panic? Does the minify_test imply that this will now ‘work’ by not apply but keeping the existing colors in color-mix in this case? I don’t know Rust…

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it'll fall back to an unparsed property, which will preserve the original source as is.

@devongovett devongovett merged commit 41ce3ab into parcel-bundler:master Nov 3, 2024
@inottn inottn deleted the fix/color-mix branch November 3, 2024 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: color-mix()-ing with <system-color>s panics

3 participants