classes and pseudoclasses
I was looking at how the fltk site appears, and noticed that dillo and firefox have different ideas of what to do for: <html><head><style> A:link {color: #ff0000} A.unsel {color: #000000; background-color: #00ff00} </style></head><body> <a class=unsel href=http://www.dillo.org>a link</a> </body></html>
On Wed, Apr 21, 2010 at 02:45:10AM +0000, corvid wrote:
I was looking at how the fltk site appears, and noticed that dillo and firefox have different ideas of what to do for:
<html><head><style> A:link {color: #ff0000} A.unsel {color: #000000; background-color: #00ff00} </style></head><body> <a class=unsel href=http://www.dillo.org>a link</a> </body></html>
Both selectors have the same specificity and therefore the ordering is relevant - the later one should beat the first one (http://www.w3.org/TR/CSS2/cascade.html#cascading-order). dillo stores the selectors in several hash maps and lists for fast access and unfortunately in this case the two selectors end up in separate lists and so the ordering information is lost. The same thing can happen if an element has more than one class: <html><head><style> A.foo {color: #ff0000} A.bar {color: #000000; background-color: #00ff00} </style></head><body> <a class="foo bar" href=http://www.dillo.org>a link</a> </body></html> The obvious fix is to store order information in the selectors and sort them before applying. The question is how to do that efficient (memory and CPU-wise).
participants (2)
-
corvid@lavabit.com
-
Johannes.Hofmann@gmx.de