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

Supporting CSS Color Module Level 4 and 5 #801

Open
3 of 18 tasks
JakeQZ opened this issue Jan 23, 2025 · 0 comments
Open
3 of 18 tasks

Supporting CSS Color Module Level 4 and 5 #801

JakeQZ opened this issue Jan 23, 2025 · 0 comments
Labels
css4 Relating to features introduced in CSS4 enhancement

Comments

@JakeQZ
Copy link
Contributor

JakeQZ commented Jan 23, 2025

This is a task list of enhancements required to fully support the above (strictly).

High priority (ideally included in next release)

Low priority (would be nice to have, but we have other fish to fry in the meantime, so to speak)

  • Add rendering option to output color functions using "modern" syntax
  • Reject color functions with invalid length arguments, such as 10px, including rejecting percentage arguments where these are not permitted (e.g. in "legacy" syntax)
  • Parse color functions containing var() substitutions as Color rather than generic CSSFunction
  • Support additional color functions (these will currently be parsed as generic CSS functions, which may not work reliably):
    • hwb
    • lab
    • lch
    • oklab
    • oklch
  • Support color function:
  • Support relative colors (level 5)
@JakeQZ JakeQZ added css4 Relating to features introduced in CSS4 enhancement labels Jan 23, 2025
JakeQZ added a commit that referenced this issue Jan 27, 2025
The "legacy" syntax does not allow a mixture of `percentage`s and `number`s
for the red, green and blue components.
So if `rgb`/`rgba` functions that have such a mixture are rendered in the
"legacy" syntax, an invalid property value will result.

An `OutputFormat` option to use the "modern" syntax throughout will be added
later (see #801).
JakeQZ added a commit that referenced this issue Jan 27, 2025
The "legacy" syntax does not allow a mixture of `percentage`s and `number`s
for the red, green and blue components.
So if `rgb`/`rgba` functions that have such a mixture are rendered in the
"legacy" syntax, an invalid property value will result.

An `OutputFormat` option to use the "modern" syntax throughout will be added
later (see #801).
oliverklee pushed a commit that referenced this issue Jan 30, 2025
The "legacy" syntax does not allow a mixture of `percentage`s and `number`s
for the red, green and blue components.
So if `rgb`/`rgba` functions that have such a mixture are rendered in the
"legacy" syntax, an invalid property value will result.

An `OutputFormat` option to use the "modern" syntax throughout will be added
later (see #801).

References:
- https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb#formal_syntax
- https://www.w3.org/TR/css-color-4/#rgb-functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css4 Relating to features introduced in CSS4 enhancement
Projects
None yet
Development

No branches or pull requests

1 participant