- From: 一丝 via GitHub <sysbot+gh@w3.org>
- Date: Sun, 27 Mar 2022 03:15:12 +0000
- To: public-css-archive@w3.org
I'm going to fix the error that esbuild's CSS parser throws when parsing `animation-name: <string>`. So, I've spent a lot of time sorting out this change.
```bash
$ esbuild test.css --minify
▲ [WARNING] Expected identifier but found "\"foo\""
m.css:1:11:
1 │ @keyframes "foo" {
╵ ~~~~~
1 warning
@keyframes ""{0%{background:#00f}to{background:green}}
```
- Firefox 53 [started supporting](https://bugzilla.mozilla.org/show_bug.cgi?id=1320474) `animation-name: <string>`, but [WPT](https://github.com/web-platform-tests/wpt/blob/4ed710aa4f4ac3e5f7027a13ada557adb9914b7d/css/css-animations/parsing/animation-name-invalid.html#L14-L20) was not updated?
- Chrome doesn't seem to have noticed this change in the spec, and has instead deliberately removed string support in [bug 423424](https://bugs.chromium.org/p/chromium/issues/detail?id=423424#c11). So I'm not sure which versions of Chrome support the `animation-name: <string>` without the prefix, this in turn increases the cost of implementing tools like Autoprefixer( see https://github.com/postcss/autoprefixer/issues/1450).
- Safari I haven't investigated yet.
This is really messed up. I hope that such compatibility issues can be avoided or reduced in the future, and that the addition of string brings a greater cost to other parsers.
--
GitHub Notification of comment by yisibl
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/118#issuecomment-1079828983 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 27 March 2022 03:15:15 UTC