On Mon, Sep 28, 2009 at 4:35 PM, Emanuele D'Arrigo <[email protected]> wrote: > Hello again, > > I've been wondering: how does mozilla's layout avoid potential css > loops? Take this two css rules: > > div[style="color:blue"] {color:red} > div[style="color:red"] {color:blue}
This wouldn't cause a loop, inline styles (style="color:red") have a higher specifity than selectors in a style block. See also http://www.w3.org/TR/CSS2/cascade.html#specificity for some more info. Regards, Martijn > Admittedly, this would not exactly be a sensible thing to do. But what > prevents a sensibility-lacking individual from generating a loop in > which a div's color is set to blue which the css-handling > functionality then sets to red which is then set back to blue again > and so on, ad infinitum? Sorry if it's a bit of a silly question... > > Manu > _______________________________________________ > dev-tech-layout mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-tech-layout > -- Martijn Wargers - Help Mozilla! http://quality.mozilla.org/ http://wiki.mozilla.org/Mozilla_QA_Community irc://irc.mozilla.org/qa - /nick mw22 _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

