Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-animations] Allow CSSKeyframesRule.name to set reserved values #801

Closed
Manishearth opened this issue Dec 13, 2016 · 3 comments
Closed
Labels
css-animations-1 Current Work

Comments

@Manishearth
Copy link
Member

https://drafts.csswg.org/css-animations/#dom-csskeyframesrule-name

Setting this property to a value matching a CSS-wide keyword or any keyword defined for the animation-name property will throw a SyntaxError exception.

However, it is already possible to create a keyframes rule with a name matching a CSS-wide keyword using a string -- @keyframes "initial" {..} works (See https://drafts.csswg.org/css-animations/#typedef-keyframes-name and Example 2 below it). The DOM setter should be able to create such rules, so we should remove the ability for the setter to throw a syntax error and allow all strings.

cc @canaltinova @dbaron

@SimonSapin
Copy link
Contributor

I’m changing Servo’s implementation to not throw, and instead store a value that serializes as a quoted string.

@birtles
Copy link
Contributor

birtles commented Apr 26, 2017

I also checked and noticed that Gecko already allows quoted strings and does not throw when setting reserved values: https://codepen.io/birtles/pen/xdRjap

@dbaron
Copy link
Member

dbaron commented Apr 26, 2017

Gecko changed to allow strings in bug 1320474, which cites #118.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-animations-1 Current Work
Projects
None yet
Development

No branches or pull requests

5 participants