Skip to content

[css-color-4] Is color space name case sensitive? #5052

@LeaVerou

Description

@LeaVerou

I can't find anything in the definition of <ident> that restricts it to being case sensitive or not, so I assume it depends on usage (this seems to be the case in other places that use <ident>, such as custom properties.

There is nothing about case sensitivity in the definition of color(). WebKit, which is the only current implementation, seems to treat it as case insensitive. demo.

Not sure if there are any color spaces that are only distinct by capitalization. There are certainly some that are weird if lowercased, e.g. xyY, but I'm leaning towards case-insensitivity, unless someone can produce an example of color space names that actually clash if same cased.

If we change this to case sensitive, we should probably do so ASAP before other implementations.
If we don't, we should still clarify in the spec.

CC @svgeesus @tabatkins

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closed as Question AnsweredUsed when the issue is more of a question than a problem, and it's been answered.css-color-4Current Work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions