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

assignments without a value #60

Open
ucarbehlul opened this issue Sep 29, 2013 · 1 comment
Open

assignments without a value #60

ucarbehlul opened this issue Sep 29, 2013 · 1 comment

Comments

@ucarbehlul
Copy link

I don't know if it's a valid syntax according to W3C specifications but I sometimes see assignments like visibility:.

It seems these kind of assignments make the CSS elements disappear, so they are kind of shortcut for reassigning to default value.

This is not a big problem if you write the code yourself but this causes problems when you run javascript code in an arbitrary website. Current implementation gives a TypeError(you get undefined from array) in CSSStyleDeclaration.js file in cssText set method.

Is it possible to change the implementation for supporting assigments without a value in the way I described?

Thanks.

@PlNG
Copy link

PlNG commented Nov 15, 2013

I see two ways to proceed with this fix:

  1. The quick and dirty fix: Use the CSS3 proposed keyword value: "initial". Considering that this is CSS3, older user agent support would be a problem, and we would be counting on user agents to get it right.
  2. The long way: Create an object list of properties containing their initial values and query it. This solution would have an issue with undefined | unknown properties, so a bailout would be needed. Github Project CSS-Crush seems to have a fairly complete list at a glance. A further issue from checking the project seems to indicate that there may be differences in the specification depending on locale, namely quotes.

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

No branches or pull requests

2 participants