- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Tue, 27 Apr 2010 14:40:40 -0400
- To: Markus Ernst <derernst@gmx.ch>
- CC: www-style@w3.org
On 4/27/10 10:43 AM, Markus Ernst wrote:
> function showHide(elementId, mode) {
> var el = document.getElementById(elementId);
> el.style.display = mode == "show" ? "" : "none";
> }
>
> Anyway, I did not find a specification for this, so I am not sure if this is supposed to work like that in every UA. And for sure, a "default" keyword would be more intuitive.
But the above doesn't set display to "default". It sets it to "whatever
it is ignoring inline style", since a set to "" is treated like
removeProperty.
It's not clear to me how "default" would be defined. Care to suggest a
definition?
> Also, I like the idea of a 'defined' keyword to reset the value from the stylesheet.
Not sure what you mean. Can you give an example?
-Boris
Received on Tuesday, 27 April 2010 18:41:15 UTC