On May 2, 2009, at 8:16 PM, Gunlaug Sørtun wrote:

> This reduced hack should otherwise work, at least back to Fx 1.5 (not
> thoroughly tested)...
>
> @-moz-document url-prefix() {
> :root>body ELEMENT-SELECTOR {/* fix old Gecko */}
> :root>body:not(:nth-child(0)):only-of-type>*|*:not(|*)
> ELEMENT-SELECTOR {/* correct value for new Gecko */}
> }
You don't really need to make it that complicated

@-moz-document url-prefix() {
:root>body ELEMENT-SELECTOR {/* fix Gecko 1.9.0 and older */}
:root>body:only-of-type ELEMENT-SELECTOR {/* correct value for Gecko  
1.9.1 + */}
}
works just as well :-)

Gecko 1.9.0 and older (Fx 3.0.x and older) don't understand the ':only- 
of-type' pseudo-class. The second line just makes the selector a tad  
more specific.
(not that I really recommend using this kind of stuff for all the  
reasons you mentioned. And I wouldn't  build the form as in the given  
problem file).

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to