8000 [css-color] Unnecessary comma in color() · Issue #266 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-color] Unnecessary comma in color() #266

@tabatkins

Description

@tabatkins

color()'s grammar is:

<ident> , <args> , <alpha>?, <fallback>?

The comma between the args and alpha is required, as we don't know how many args they are and both can be numbers. The comma between the fallback and the preceding stuff isn't strictly necessary, but it's pretty natural and matches up with other function's fallback arguments.

But the comma between the colorspace name and the arguments isn't necessary. There's no grammatical ambiguity possible, nor any strong tradition of comma usage in similar situations.

Can we remove it? Then we won't need any commas in the common case, like color(adobe-rgb 255 0 0).

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0