W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2021

Re: [csswg-drafts] [css-color-5] Findings on SCSS function usage to inform direction of Color 5 (#5782)

From: Miriam Suzanne via GitHub <sysbot+gh@w3.org>
Date: Mon, 11 Jan 2021 22:11:09 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-758256834-1610403068-sysbot+gh@w3.org>
Just to clarify some of the Sass context here…

> I see scale-color and adjust-color are much less used, even though the SCSS documentation specifically says they are better. Which implies that ease of understanding and ease of use (simpler syntax) is valued over the end result.

Part of this also comes down to timing. The `lighten()` and `darken()` functions predate all the more advanced options, and the warning about which is better.

> Most of the usage in SCSS etc uses HSL because **that is all that is available** although I understand @mirisuzanne added some support for LCH recently.

I wrote the @oddbird/blend library, which provides conversion between Sass colors & LCH, but we have not added any LCH functionality to the Sass core. We did add `hwb()` recently, since it describes sRGB space - but we haven't solved how we want to handle color-spaces. We're waiting for a more stable CSS spec before we add it to Sass.

Also worth note: all Sass output is in hex, color keywords, or `rgba()` – whichever is shortest, with the largest legacy browser support. Even if authors are writing `hsl()` or `hwb()` in their Sass, that will not appear in their production CSS.

GitHub Notification of comment by mirisuzanne
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5782#issuecomment-758256834 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 11 January 2021 22:11:11 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:25 UTC