- From: Anton Prowse <prowse@moonhenge.net>
- Date: Tue, 27 Apr 2010 23:07:17 +0200
- To: "www-style@w3.org" <www-style@w3.org>
- CC: Colt Antonio Pini <Colt.Pini@nau.edu>
Colt Antonio Pini wrote: > 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; > } > ' Both beautiful and abominable! There's scope for a book here: "Working Around Dodgy Authoring Tools for Fun and Profit"... > > 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. You're probably thinking about the User Agent stylesheet value here. But Boris has pointed out, it's more complicated than this; what if there are user ("personalized") stylesheets, for example? > > 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.) > You're talking about going back to what the style would have been if you hadn't set the 'display' property. As Tab, Markus and Boris were discussing, the answer is to not set the 'display' property, or, if you /did/ set the 'display' property eg to display:none, just remove it from the place where you set it. Cheers, Anton Prowse http://dev.moonhenge.net
Received on Tuesday, 27 April 2010 21:08:13 UTC