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

[css-color-5] Relative color syntax channel keyword multiplication with percentages #10041

Closed
romainmenke opened this issue Mar 7, 2024 · 2 comments
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. css-color-5 Color modification

Comments

@romainmenke
Copy link
Member

<number> * <percentage> works in Chrome:

oklch(from red calc(1 * 50%) c h)

l * <percentage> doesn't work in Chrome.

oklch(from red calc(l * 50%) c h)

https://codepen.io/romainmenke/pen/PogPgmV

@svgeesus This is mostly just a sanity check.

As far as I know there isn't anything special here and multiplying channel keywords by percentages should just work.

If so, I will file the needed bugs and add more WPT tests.

@tabatkins
Copy link
Member

Yes, the channel keywords are numbers, and the channels can be numbers or percentages, so this should work.

@romainmenke
Copy link
Member Author

Tests have been merged and bug has been filed.

I think this can be closed?

Thank you 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. css-color-5 Color modification
Projects
None yet
Development

No branches or pull requests

3 participants