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

Reorganize the hsl() page #14651

Merged
merged 23 commits into from
Apr 8, 2022
Merged

Reorganize the hsl() page #14651

merged 23 commits into from
Apr 8, 2022

Conversation

teoli2003
Copy link
Contributor

@teoli2003 teoli2003 commented Apr 4, 2022

This PR is part of openwebdocs/project#92.

The idea here is to simplify the page:

  • Reorganize the different syntaxes in one block as we do elsewhere on MDN. In one glance, all the possible syntaxes are visible.
  • Put the modern, space-separated, syntax first.
  • Get rid of mentions of CSS Color Level4: the developer only needs to know if this is supported or not
  • Get rid of the note saying that hsla() is an alias. I put this in the See also section, this will stay prominent in hsla() as we want to lower its use, but not here.
  • Describe each parameter separately.

Note that the spec and browser compat sections, although defined correctly, are only partially displayed until mdn/browser-compat-data#15646 is resolved. (This is also the cause of the flaw reported by our Preview URLs bot)

This is the first color function to be reorganized. The idea is to do the same for each of the 7 others.

@github-actions github-actions bot added the Content:CSS Cascading Style Sheets docs label Apr 4, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2022

Preview URLs

Flaws

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

  • macros:
    • /en-US/docs/Glossary/color_wheel does not exist
    • /en-US/docs/Glossary/color_wheel does not exist
  • bad_bcd_links:
    • no explanation!

External URLs

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

(this comment was updated 2022-04-07 11:59:36.442472)

@teoli2003 teoli2003 requested a review from Rumyra April 4, 2022 14:33
@teoli2003 teoli2003 marked this pull request as ready for review April 4, 2022 14:33
@teoli2003 teoli2003 requested a review from a team as a code owner April 4, 2022 14:33
Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

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

Nice.

files/en-us/web/css/color_value/hsl/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/color_value/hsl/index.md Outdated Show resolved Hide resolved
```

### Values

- Functional notation: `hsl(H, S, L[, A])`
- `hue`
- : An {{cssxref("&lt;angle&gt;")}} of the color wheel given in one of the following units: `deg`, `rad`, `grad`, or `turn`. When written as a unitless {{cssxref("&lt;number&gt;")}}, it is interpreted as degrees. By definition, _red_ is `0deg`, with the other colors spread around the circle, so _green_ is `120deg`, _blue_ is `240deg`, etc. As an `<angle>` is periodic, it implicitly wraps around such that `-120deg` = `240deg`, `480deg` = `120deg`, `-1turn` = `1turn?, etc.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a link to the color wheel we can use here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added one for the explanation and link to a color picker for hsl() in the See also section. If I find a better hsl color finder, I'll update the page.

files/en-us/web/css/color_value/hsl/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/color_value/hsl/index.md Outdated Show resolved Hide resolved
committing these two to see if it fixes the rendering.

Co-authored-by: wbamberg <will@bootbonnet.ca>
teoli2003 and others added 2 commits April 5, 2022 07:19
Co-authored-by: wbamberg <will@bootbonnet.ca>
Co-authored-by: wbamberg <will@bootbonnet.ca>
Co-authored-by: wbamberg <will@bootbonnet.ca>
Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

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

👍 thanks!

@teoli2003
Copy link
Contributor Author

I'm creating two glossary entries (sRGB and color wheel) to link from here (and elsewhere), I will add an example and an extra sentence. I will rerequest review when this is done (the glossary entries will be in separate PRs).

@teoli2003 teoli2003 marked this pull request as draft April 6, 2022 07:54
@teoli2003
Copy link
Contributor Author

@estelle I have a quick question. We have a glossary entry for RGB. What about we improve it to explain sRGB, add a redirect between sRGB and RGB and use this to link sRGB here?

I'm not sure we need two separate glossary entries for RGB and sRGB.

@teoli2003 teoli2003 marked this pull request as ready for review April 6, 2022 14:41
@teoli2003 teoli2003 requested a review from wbamberg April 6, 2022 14:42
@estelle
Copy link
Member

estelle commented Apr 6, 2022

I'm not sure we need two separate glossary entries for RGB and sRGB.

We don't. we just need to update sRGB to explain it and add links from sRGB to sRGB colors.

@teoli2003
Copy link
Contributor Author

👍 I will update the RGB glossary entry tomorrow (or Friday). (In a different PR).

@teoli2003
Copy link
Contributor Author

As it is approved, and feedback addressed I'm merging this, we can do follow-ups if needed. (I still need to update RGB and to get the color wheel glossary entry landed, but this will be in separate PRs)

@teoli2003 teoli2003 merged commit c480d63 into mdn:main Apr 8, 2022
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