- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Sat, 15 Feb 2014 20:47:20 -0800
- To: Brad Kemper <brad.kemper@gmail.com>
- Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Daniel Glazman <daniel.glazman@disruptive-innovations.com>, www-style list <www-style@w3.org>
On Sat, Feb 15, 2014 at 4:00 PM, Brad Kemper <brad.kemper@gmail.com> wrote: > On Feb 14, 2014, at 4:40 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote: > >>> Although entirely valid in Selectors used in the scope of CSS, >>> attribute node pseudo-elements never generate boxes. > > Doesn't that have more to do with the restrictions of HTML than of CSS? Some other theoretical XML-based document language could use CSS to create boxes out of attributes, couldn't it? Pseudo-elements in CSS always select, well, pseudo-elements, with the purpose to define some properties of them. By introducing ::attr() we create precedent of defining selectors not for CSS realm. If someone need to select attributes (why not text/comment nodes too by the way?) then it is matter of writing trivial functions like: document.queryAttribute = function(elselector,attribute) { .. } Otherwise we need to mention cases like this: input[type="number"]::attr(type) { content:"text" } etc. Either we need to treat ::attr() as first-class pseudo-elements or left them shine in DOM methods or libraries like jquery. -- Andrew Fedoniouk. http://terrainformatica.com
Received on Sunday, 16 February 2014 04:47:47 UTC