Thomas Fuchs wrote:

>This doesn't help if you do display:none in external CSS. This overrides
>the default setting of the element, and you've no clue afterwards if it
>should be "block", "inline", etc.
>
>CSS should provide a general "render or render not" switch, but  
>doesn't. :(
>  
>
Ugh. right.
For kicks (and tangentially as it turns out), I went looking at what the 
browser differences were on those default display values. I've got a 
test page at:
http://www.sam-i-am.com/work/sandbox/css/display/html4.html

And xls / csv in:
http://www.sam-i-am.com/work/sandbox/css/display/

There's FF1.5, IE6 and Opera 9 in there so far. I'll be able to check 
IE7 at work, Safari too maybe.
(The wild-card here is does it matter if its quirks/standards mode? I'd 
suspect maybe. There's a xhtml.html test page in there too if anyone's 
interested.)

But, like you say, you could have a stylesheet like:
h1 { display: inline }

and markup: <h1 style="display: none">

.. where the expected behavior if I was toggling show/hide on this h1 
would be that it would be inline when showing. But without looking 
through all the style rules, all I know when the page loads is that its 
display: none, so by my own reasoning i'd have to guess at 'block' as 
the showing value. Wrong.

It still makes sense to check Element.getStyle(elm, 'display') though, 
instead of just looking at elm.style.display?

Sam (-i-am)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs
-~----------~----~----~----~------~----~------~--~---

Reply via email to