W3C home > Mailing lists > Public > www-style@w3.org > April 2010

RE: Display

From: Colt Antonio Pini <Colt.Pini@nau.edu>
Date: Tue, 27 Apr 2010 13:35:13 -0700
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <786443B5C7E00948B25B7C9C5CADAF8304E335119F@NAUFLG-CMS1.nau.froot.nau.edu>
Just a couple of things on this thread, on the original problem, where visual studio is toggling the inline style from display:none to display:inline, I am putting in a rule in my stylesheet 

'
	.form li > label span[style*="inline"] {
		display: block !important;	
		}
'
That corrects the problem, for my case (don't know what to do for IE7 yet, but that is ok for now. :) ).


Boris -- 

Just to clarify what I meant by "default" and "defined" :

Default - 

	This would reset the display to the original display of the element. For example, I have a span and this definition in my stylesheet:

span {display:block;} 


The intended action of a default would be to reset the element to the original display. So adding this :

<span style="display:default">foo</span>

Would restore the display of the span to the original, inline. 


Defined - 

	This would define the display by the next highest definition of the element. Using the last example adding this to my stylesheet:

span {display:block;}

then adding this into the inline style:

<span style="display:defined">foo</span>

Would restore the definition in the style sheet of display:block; 

(also, If there was a display:none, for example in the page <style> tag then it would refer to that. If there is no definition, it would then refer to the default display.)


The names "default" and "defined" aren't set, they could be named something different, just the functionality.


-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of Boris Zbarsky
Sent: Tuesday, April 27, 2010 11:41 AM
To: Markus Ernst
Cc: www-style@w3.org
Subject: Re: Display

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 20:36:19 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:26 GMT