Intent to prototype and ship: hwb() colors

98 views
Skip to first unread message

Emilio Cobos Álvarez

unread,
Nov 26, 2021, 7:37:46 AM11/26/21
to Mozilla
Summary: Enable hwb() color support (spec contains reasoning as for why
is it useful). The code was contributed by Adobe in:

https://github.com/servo/rust-cssparser/pull/292

Bug: https://bugzil.la/1352755

Standard: https://drafts.csswg.org/css-color-4/#the-hwb-notation

Platform coverage: All

Preference: None (it's a trivial extension to the already-shipping hsl()
code, so I think we probably don't need it).

DevTools bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1743107

Other browsers:

* WebKit/Safari supports this.
* Chromium doesn't.

web-platform-tests: There are quite a few and we pass them with the patch.

-- Emilio

Sebastian Zartner

unread,
Dec 24, 2021, 3:15:22 AM12/24/21
to Emilio Cobos Álvarez, Mozilla
I want to point out that there is some difference to the existing hsl() function, though. Namely, hwb() only supports the newer space-separated syntax, not the old comma-separated syntax. See https://bugzilla.mozilla.org/show_bug.cgi?id=1747528 for further information.

Sebastian

--
You received this message because you are subscribed to the Google Groups "dev-pl...@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev-platform...@mozilla.org.
To view this discussion on the web visit https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/caa06414-0b4d-021a-616c-5ea53d65bca7%40mozilla.com.

Emilio Cobos Álvarez

unread,
Dec 24, 2021, 1:49:32 PM12/24/21
to Sebastian Zartner, Mozilla
Thanks, that's a really good catch!

FWIW, I'm not sure I agree with it, filed:

https://github.com/w3c/csswg-drafts/issues/6911

But for now I'll fix in:

https://github.com/servo/rust-cssparser/pull/295

And make sure we don't ship the comma syntax unless the above issue is
resolved in another direction.

-- Emilio

On 12/24/21 09:15, Sebastian Zartner wrote:
> I want to point out that there is some difference to the existing hsl()
> function, though. Namely, hwb() only supports the newer space-separated
> syntax, not the old comma-separated syntax. See
> https://bugzilla.mozilla.org/show_bug.cgi?id=1747528
> <https://bugzilla.mozilla.org/show_bug.cgi?id=1747528> for further
> information.
>
> Sebastian
>
> On Fri, 26 Nov 2021 at 13:37, Emilio Cobos Álvarez <emi...@mozilla.com
> <mailto:emi...@mozilla.com>> wrote:
>
> Summary: Enable hwb() color support (spec contains reasoning as for why
> is it useful). The code was contributed by Adobe in:
>
> https://github.com/servo/rust-cssparser/pull/292
> <https://github.com/servo/rust-cssparser/pull/292>
>
> Bug: https://bugzil.la/1352755 <https://bugzil.la/1352755>
>
> Standard: https://drafts.csswg.org/css-color-4/#the-hwb-notation
> <https://drafts.csswg.org/css-color-4/#the-hwb-notation>
>
> Platform coverage: All
>
> Preference: None (it's a trivial extension to the already-shipping
> hsl()
> code, so I think we probably don't need it).
>
> DevTools bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1743107
> <https://bugzilla.mozilla.org/show_bug.cgi?id=1743107>
>
> Other browsers:
>
>   * WebKit/Safari supports this.
>   * Chromium doesn't.
>
> web-platform-tests: There are quite a few and we pass them with the
> patch.
>
>   -- Emilio
>
> --
> You received this message because you are subscribed to the Google
> Groups "dev-pl...@mozilla.org <mailto:dev-pl...@mozilla.org>"
> group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to dev-platform...@mozilla.org
> <mailto:dev-platform%2Bunsu...@mozilla.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/caa06414-0b4d-021a-616c-5ea53d65bca7%40mozilla.com <https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/caa06414-0b4d-021a-616c-5ea53d65bca7%40mozilla.com>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "dev-pl...@mozilla.org" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to dev-platform...@mozilla.org
> <mailto:dev-platform...@mozilla.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/CAERejNbJ3vnY4ZjrLQgsRijWSK6uqci7fWyC15HTmd_0tQ931A%40mail.gmail.com <https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/CAERejNbJ3vnY4ZjrLQgsRijWSK6uqci7fWyC15HTmd_0tQ931A%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages