You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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-Crushseems 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.
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 incssText
set method.Is it possible to change the implementation for supporting assigments without a value in the way I described?
Thanks.
The text was updated successfully, but these errors were encountered: