CSS Selectors not enough
What I miss the most in CSS ? Clearly, with no doubt, selectors
allowing to select based on children. I have proposed that to the CSS
WG so many years ago. And for the first time, I would need the
:matches() proposal by Ian Hickson... Here's why:
I am working on HTML templates in Nvu. The easiest way to declare a document is conformant to a template is probably
<html templateref="http://glazman.org/templates/glazblog.mzt"> ...
But it's not clean. A clean way of doing it is probably:
<html> <head> <title>...</title> <link rel="template" href="http://glazman.org/templates/glazblog.mzt" type="text/html"/> ... </head> <body> ...
But that's unfortunately not an option, since I can't apply a style
body depending on the existence of a
head... That's very annoying. It can't be
expressed with CSS Selectors, including CSS 3 Selectors. Even with the subject selector, it's not possible.
:matches(), that's doable:
head:matches(# > link[rel="template"]) + body
Simple, easy, nice. Unfortunately, that's not available...