On Sat, Jan 17, 2009 at 11:54:08PM +0100, Hofmann Johannes wrote:
On Sat, Jan 17, 2009 at 10:42:36PM +0000, corvid wrote:
Johannes wrote:
On Sat, Jan 17, 2009 at 07:17:53PM +0000, corvid wrote:
Johannes wrote:
On Sat, Jan 17, 2009 at 04:29:37PM +0000, corvid wrote:
I wonder whether there's a way to specify something like code, tt, pre, samp, kbd {font-family: mono !important} * {font-family: sans !important} but have sans only for elements not otherwise specified.
According to http://www.w3.org/TR/CSS21/cascade.html#specificity the first rule should overrule the second one if it matches. So this should work. Note, that the specificity stuff is not fully implemented yet, but it should be sufficient for the example above.
Does it work for you?
Yes, I tried:
code, tt, pre, samp, kbd {color: green !important} * {color: red !important}
on http://www.dillo.org/CSS.html and it seemed to work ok.
All red for me.
I tried reverting to the official tip, even I don't have anything much except forms code in my tree right now. Still all red.
How strange that we would see different behaviour here...
Weird...
I guess I'll have to dive into the code myself...
Check CssStyleSheet::apply(). The color:red directive should be in the anyTable and the color:green thing in elementTable[docTree->top ()->element], if element is code, tt ...
Due to the ordering in the inner for-loop, the color:red should be overridden by color:green for these elements.
Wait. Now, that I wrote it, there may be an issue here... Will check that.