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

feat(css): Update/Extract <color> syntax #859

Merged
merged 3 commits into from
Jan 15, 2025
Merged

Conversation

skyclouds2001
Copy link
Contributor

@skyclouds2001 skyclouds2001 commented Dec 26, 2024

Description

update the syntax to match the specification

  • extract <color> into <color> <color-base> <color-function> per spec
  • add the missing light-dark() and color-mix() syntax usage (as contrast-color() device-cmyk() is never supported at present, it is better not to add it at present)
  • remove values of <deprecated-system-color> that are already in <system-color>
  • remove transparent value of <named-color>, as the spec regard it as a special keyword

Motivation

Additional details

https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
https://developer.mozilla.org/en-US/docs/Web/CSS/named-color
https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color
https://developer.mozilla.org/en-US/docs/Web/CSS/system-color
https://drafts.csswg.org/css-color-5/#typedef-color

Related issues and pull requests

Relates to csstree/validator#29
Relates to #819

Depends on:

@skyclouds2001 skyclouds2001 marked this pull request as ready for review December 26, 2024 08:36
@skyclouds2001 skyclouds2001 requested a review from a team as a code owner December 26, 2024 08:36
@skyclouds2001 skyclouds2001 requested review from bsmth and removed request for a team December 26, 2024 08:36
@skyclouds2001 skyclouds2001 changed the title feat(css): Update/Extra <color> syntax feat(css): Update/Extract <color> syntax Dec 27, 2024
Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

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

Nice, lgtm, thanks 👍🏻

@bsmth bsmth merged commit ec560a1 into mdn:main Jan 15, 2025
3 checks passed
@skyclouds2001 skyclouds2001 deleted the color branch January 15, 2025 16:21
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.

2 participants