L. David Baron wrote:
On Tuesday 2008-11-25 08:49 -0800, John J. Barton wrote:
Boris Zbarsky wrote:
John J. Barton wrote:
Firebug displays the CSS for the 'a' tag in the following example with 36px overridden by the 10px with 'important!'. Given that the 'div' surrounds the 'a', this seems correct to me.

However Firefox displays with link in 36px. Who's correct and why?
...
div {
    font-size:10px !important;
}
a {
    font-size:36px;
}
The computed font-size of the <a> is 36px. font-size does inherit by default, but only by default. If it's specified on the node directly, the computed value is the specified value.

Sounds to me like the firebug display is pretty wrong.

-Boris
Ouch! Is this special case for font-size only?

No.  inheritance is a lower priority than any specified value,
whether !important or not, so the only way the a would inherit from
the div is if nothing were specified for that property in rules that
match the a.

Ah, ok I think I get it. The !important stuff only kicks in when we are comparing rules related to given element, not when we are comparing rules rules on an element to rules inherited from containers.

jjb
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to