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

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

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

inottn
Copy link
Contributor

@inottn inottn commented Sep 27, 2024

if matches!(self, CssColor::CurrentColor) || matches!(other, CssColor::CurrentColor) {
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
3 checks passed
@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