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

relnote(Fx111): color(), lab(), lch(), oklab(), oklch() support #25015

Merged
merged 19 commits into from Mar 7, 2023

Conversation

bsmth
Copy link
Member

@bsmth bsmth commented Mar 2, 2023

CSS color functions enabled behind a pref (layout.css.more_color_4.enabled) in Fx 111

Additions:

  • color() includes @media query to detect color-gamut support.
  • Examples added for lab(), lch(), oklab(), oklch()
  • Explained ranges for values in color functional notation

Other:

  • Changed use of https://bugzil.la/<number>) to {{bug(<number>)}}

Related issues and pull requests:

Bugzilla:

TODO:

  • The bug macro is deprecated, revert changes in this PR that touch this

@bsmth bsmth requested review from a team as code owners March 2, 2023 16:22
@bsmth bsmth requested review from estelle and hamishwillee and removed request for a team March 2, 2023 16:22
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs Content:Other Any docs not covered by another "Content:" label labels Mar 2, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2023

Preview URLs (7 pages)
External URLs (3)

URL: /en-US/docs/Web/CSS/color_value/oklab
Title: oklab()


URL: /en-US/docs/Mozilla/Firefox/Releases/111
Title: Firefox 111 for developers

(comment last updated: 2023-03-07 08:43:42)

@estelle
Copy link
Member

estelle commented Mar 3, 2023

Hi @bsmth

Can we change all the id and id values to data attributes so the HTML reads:

<div data-color="<your current id>"

and all the CSS selectors read:

[data-color="<your current id>"]

We do want to teach people to use attribute selectors. We don't want to teach people to use ID selectors, especially ones based on appearance.

This fix can be a quick search/replace.

Alternatively, we could use the actual used value at the value of the data-color attribute, like so:

<div data-color="rgb(0 0 0 / 0.5)">, which isn't possible when using IDs. Maybe one day this attr() example will work, but we are not there yet. https://bugzilla.mozilla.org/show_bug.cgi?id=1448251

@bsmth
Copy link
Member Author

bsmth commented Mar 6, 2023

Can we change all the id and id values to data attributes so the HTML reads:

<div data-color="<your current id>"

and all the CSS selectors read:

[data-color="<your current id>"]

Thanks, @estelle - done in 2a770c2

@bsmth bsmth requested a review from estelle March 7, 2023 08:23
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

minor edits.

@estelle estelle merged commit 798f094 into mdn:main Mar 7, 2023
@bsmth bsmth deleted the 24395_css_lab_lch_color branch March 7, 2023 08:43
@bsmth
Copy link
Member Author

bsmth commented Mar 7, 2023

Thanks @estelle 🙌🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs Content:Other Any docs not covered by another "Content:" label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants