[csswg-drafts] [css-values][css-images] Allow trailing comma in gradient functions (and probably others) (#4968)

upsuper has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-values][css-images] Allow trailing comma in gradient functions (and probably others) ==
Trailing comma can be visual pleasing with certain code styles, for example, this code piece from MDN:
```css
body {
  background: linear-gradient(to right, 
     red 20%, orange 20% 40%, yellow 40% 60%, green 60% 80%, blue 80%);
}
```
can be written as
```css
body {
  background: linear-gradient(
    to right,
    red 20%,
    orange 20% 40%,
    yellow 40% 60%,
    green 60% 80%,
    blue 80%,
  );
}
```
which may look better for some people.

This is currently invalid as trailing comma is not allowed.

It would probably be great if trailing comma is always accepted, like in many programming languages.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4968 using your GitHub account

Received on Saturday, 18 April 2020 01:36:15 UTC