E467 [css-color][cssom] Serialization of specified <color> values · Issue #1004 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-color][cssom] Serialization of specified <color> values #1004

@upsuper

Description

@upsuper

CSSOM spec defines the way to serialize resolved <color> values (to rgb and rgba functions), but nothing defines how specified <color> values should be specified, and it seems the existing implementations are rather complicated.

It seems to me that all browsers agree on the following things:

  • #008000 -> rgb(0, 128, 0)
  • RGB(0, 128, 0) -> rgb(0, 128, 0)
  • green -> green
  • CURRENTcolor -> currentcolor / currentColor

Some differences:

  • rgba(0, 128, 0, 1) -> Edge: rgba(0, 128, 0, 1), Gecko & Blink: rgb(0, 128, 0)
  • GrEeN -> Edge & Blink: green, Gecko: GrEeN

I think for the last case, Gecko is inconsistent to itself, so it's probably wrong. I'm less sure about the first difference, though.

Anyway, there doesn't seem to be any speced serialization algorithm does this. It should probably be put somewhere.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0