[csswg-drafts] [css-animations] Clarify whether `<keyframes-name>` supports the empty string (#7762)

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

== [css-animations] Clarify whether `<keyframes-name>` supports the empty string ==
The spec allows `<string>` here https://github.com/w3c/csswg-drafts/issues/118#issuecomment-227655060, but does not further clarify whether empty strings(`""` or `" "`) are allowed. From the CSS author's point of view, empty strings seem to be meaningless.

For current implementations across browsers, this has significant compatibility issues.

## `@keyframes "" {}`

> If the browser supports it, the page background color will be green.

```css
@-webkit-keyframes "" {
    to {
        background: green
    }
}

@-moz-keyframes "" {
    to {
        background: green
    }
}

body {
    background: red;
    -webkit-animation: "" 0s ease 1 forwards;
    -moz-animation: "" 0s ease 1 forwards;
}
```

- ` -webkit-` (Chrome) ✅
- `-webkit-`(Safari) ❌
- `-moz-`(Firefox) ❌
- without prefix(both) ❌ [Firefox bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1554737)

## `@keyframes " " {}`

```css
@-webkit-keyframes " " {
    to {
        background: green
    }
}

@-moz-keyframes " " {
    to {
        background: green
    }
}

body {
    background: red;
    -webkit-animation: " " 0s ease 1 forwards;
    -moz-animation: " " 0s ease 1 forwards;
}
```

- ` -webkit-` (Chrome) ✅
- `-webkit-`(Safari) ✅
- `-moz-`(Firefox) ✅


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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 19 September 2022 04:36:18 UTC