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

Add OKLCH and OKLab functions to reference #15033

Merged
merged 5 commits into from
Jun 2, 2022
Merged

Add OKLCH and OKLab functions to reference #15033

merged 5 commits into from
Jun 2, 2022

Conversation

ai
Copy link
Contributor

@ai ai commented Apr 15, 2022

Summary

I added OKLab color functions to CSS Functional Notation.

Motivation

They are part of CSS Color Modules 4.

Adding them to this list will fix Stylelint function-no-unknown since Stylelint uses this document as a source of all valid CSS function names.

Supporting details

Safari TP should support these functions.

Metadata

  • Adds a new document
  • Rewrites (or significantly expands) a document
  • Fixes a typo, bug, or other error

@ai ai requested a review from a team as a code owner April 15, 2022 19:20
@ai ai requested review from rachelandrew and removed request for a team April 15, 2022 19:20
@github-actions github-actions bot added the Content:CSS Cascading Style Sheets docs label Apr 15, 2022
@teoli2003
Copy link
Contributor

Is there any browser implementing them? If not, we should wait before merging this.

@ai
Copy link
Contributor Author

ai commented Apr 15, 2022

Is there any browser implementing them?

Safari TP mentions oklch() support in release notes.

@teoli2003 teoli2003 self-assigned this Apr 16, 2022
@teoli2003
Copy link
Contributor

Assigning myself for review (I'm reorganizing CSS Colors). Before landing this, I want to be sure the BCD information is up-to-date, and the subpages created (the mention is pretty useless without them)

@github-actions
Copy link
Contributor

github-actions bot commented Apr 16, 2022

Preview URLs

Flaws

URL: /en-US/docs/Web/CSS/CSS_Functions
Title: CSS Functional Notation
on GitHub
Flaw count: 23

  • macros:
    • /en-US/docs/Web/CSS/acos does not exist
    • /en-US/docs/Web/CSS/asin does not exist
    • /en-US/docs/Web/CSS/atan does not exist
    • /en-US/docs/Web/CSS/atan2 does not exist
    • /en-US/docs/Web/CSS/cos does not exist
    • and 18 more flaws omitted

URL: /en-US/docs/Web/CSS/color_value/oklch
Title: oklch()
on GitHub
Flaw count: 1

  • bad_bcd_queries:
    • No BCD data for query: css.types.color.oklch

URL: /en-US/docs/Web/CSS/color_value/oklab
Title: oklab()
on GitHub
Flaw count: 1

  • bad_bcd_queries:
    • No BCD data for query: css.types.color.oklab

External URLs

URL: /en-US/docs/Web/CSS/CSS_Functions
Title: CSS Functional Notation
on GitHub

No new external URLs


URL: /en-US/docs/Web/CSS/color_value/oklch
Title: oklch()
on GitHub


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

(this comment was updated 2022-06-02 14:24:31.706526)

@ai ai requested a review from a team as a code owner May 10, 2022 19:36
@ai ai requested review from dipikabh and removed request for a team May 10, 2022 19:36
@ai
Copy link
Contributor Author

ai commented May 10, 2022

@teoli2003 I added pages for oklab and oklch

I took lch() and lab() pages and:

  1. Replaced names
  2. Replaced examples according to OKLCH Converter (oklab() result was converted by culori Node.js module)
  3. Replaced Safari TP release
  4. Replaced link to Oklab announce article
  5. Replaced CIE Lightness to perceived lightness (the creator ok Oklab used this term).
  6. Replaced C max value to max value for sRGB and P3 colors (Rec. 2020 C value is 0.5 but there is no Rec. 2020 monitors yet).

I also added oklch() and oklab() to redirects.

Questions:

  1. How can I add compatibility data?
  2. Will {{Specifications}} macros work automatically?

@ai
Copy link
Contributor Author

ai commented May 16, 2022

@teoli2003 just to clarity why I force these changes:

The reason of this PR is not to add docs but to solve problem with CSS linters. They use MDN as a source of valid functions and right now, any CSS code with oklch() will be marked as invalid.

@teoli2003
Copy link
Contributor

Hi, ai! No worry, I just didn't have enough time to go back to this. I will review this PR this week!

Co-authored-by: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com>
@ai
Copy link
Contributor Author

ai commented May 30, 2022

@teoli2003 friendly ping for the glory of OKLCH 😺

@dipikabh dipikabh requested review from teoli2003 and removed request for dipikabh June 2, 2022 14:21
Copy link
Contributor

@teoli2003 teoli2003 left a comment

Choose a reason for hiding this comment

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

👍

@teoli2003 teoli2003 merged commit 608d658 into mdn:main Jun 2, 2022
@ai
Copy link
Contributor Author

ai commented Jun 2, 2022

Thanks! Just a small question: will it deploy automatically or did I need another step to make it public?

https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch

@teoli2003
Copy link
Contributor

It will deploy automatically, in about 24h.

@ai
Copy link
Contributor Author

ai commented Jun 3, 2022

I sent PR to compat data as well mdn/browser-compat-data#16526

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants