RE: [CSS3] ltr and rtl pseudo-class proposal

Alan, you should review :lang() as a pseudo-class. It is not much different from :rtl/:ltr in terms of functionality.

>>>
but rather an attribute belonging to the source. How can this be described as a pseudo-class? You are talking about a parent or ancestor element with a particular attribute. Almost no selector like that exist in CSS at this current time.
<<<

My warning as an implementer would be it is not easy to process a large number of "inherited" properties in the selector engine. The rules for walking your parent chain (as part of your selector and not part of resolving the rest of your complex rule) can be complex and costly, falling back (in the case of lang) to HTTP headers and META tag values as well meaning more places to search for values. Without appropriate caches performance is bad. The more caches you add for features like this the less useful the caches become.

I think where the conversation is going here is:
1) Are we done with just these two additions for inherited properties? (:ltr/:rtl)
2) Are more coming down the pipeline?

If 1 then just define the behavior in a module and let it go. If 2 then we need a special attribute selector which is capable of walking the parent chain with notes in the specification that performance of such a selector might be less than optimal.

Justin Rogers [MSFT]

Received on Monday, 17 March 2008 15:04:49 UTC