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-properties-and-values-api] should initial values be allowed to have variable references? #121

Closed
heycam opened this issue Jan 31, 2016 · 3 comments

Comments

@heycam
Copy link
Contributor

heycam commented Jan 31, 2016

What would it mean for a custom property's initial value to have a variable reference in it? It doesn't sound useful. Should it make registerProperty throw an exception?

@heycam heycam changed the title [css-properties-and-values-api] exception thrown by unregisterProperty [css-properties-and-values-api] should initial values be allowed to have variable references? Jan 31, 2016
@shans
Copy link
Contributor

shans commented Feb 1, 2016

in general, values that can't be directly represented as computed values seem weird. For example, specifying '4em' as an initial value would mean that:

(1) if the property is not inherited then it would need to compute 4em for every element
(2) if the property is inherited then the root would compute a result for 4em and the result would
be inherited down the tree.

@shans
Copy link
Contributor

shans commented Feb 1, 2016

See also #122

@tabatkins tabatkins self-assigned this Aug 17, 2016
@tabatkins
Copy link
Member

tabatkins commented Sep 13, 2016

Fixed in 321c596. var() isn't allowed, because it's not computationally idempotent (and I defined what that actually means).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants