Require quoted strings for channel names (fixes #3464)

This commit is contained in:
Miriam Suzanne 2023-01-11 11:41:59 -07:00
parent 272735914d
commit c9a9a8d3de
No known key found for this signature in database
GPG Key ID: 9C26D0996BD250AC
2 changed files with 10 additions and 3 deletions

View File

@ -3,6 +3,13 @@
* Deprecate the `color.alpha()` function along with the other legacy channel
access functions.
* Require quoted strings for channel names in `color.is-powerless()` and
`color.channel()`, to avoid syntax conflicts between `rgb` channel names and
their respective named colors (e.g. `'red'` the channel vs `red` the color).
* Define how deprecated functions behave as alias functions during the
deprecation process.
## Draft 1.2
* Clamp `hsl` saturation & lightness when generating `hsl` colors, and gamut-map

View File

@ -1443,7 +1443,7 @@ is-powerless($color, $channel, $space: null)
* If `$color` is not a color, throw an error.
* If `$channel` is not an unquoted string, throw an error.
* If `$channel` is not a quoted string, throw an error.
* If `$space` is null:
@ -1525,9 +1525,9 @@ channel($color, $channel, $space: null)
* If `$color` is not a color, throw an error.
* If `$channel` is not an unquoted string, throw an error.
* If `$channel` is not a quoted string, throw an error.
* If `$channel == alpha` (ignoring case), let `value` be the alpha value of
* If `$channel == 'alpha'` (ignoring case), let `value` be the alpha value of
`$color`.
* Otherwise: