[selectors] feedback

Reviewing http://dev.w3.org/csswg/selectors/ ...

* Section two writes "Selector" whereas the remaining text writes it "selector".
* The Selectors API is obsolete. Probably best to avoid referencing it.
* In section 3.1 the structure of selectors is defined. It seems
whitespace should not be mentioned there (at best in a note) as it is
syntax and not structure. Similarly, defining a combinator as
punctuation in that section seems somewhat sketchy. Are you defining
structure or syntax?
* For "evaluating a selector" when would you want to provide an
explicit "selector match list" rather than a "selector match root"? It
seems the typical scenario would be to match against a tree of sorts.
Providing all the elements as input seems rather odd.
* You don't define the term "context".
* Instead of "for HTML" in 3.2, you want to see, "for DOM" or some
such as that would cover HTML, XML, arbitrary documents, etc. HTML and
XML are syntax, and selectors don't operate on syntax.
* In 3.3 you renamed "selector match list" to "element tree"?
* Again, it's not that in HTML the DOM is used, the DOM is simply
used. You don't mention namespace here. Pretty sure matching is
against local name and not tag name. It's not entirely clear to me why
selectors does not directly operate on the DOM and we need this level
in between. In other contexts it seems people can define a mapping to
the DOM as needed. Part of why this is problematic is that you do not
define your elements very well yet assume in other sections that terms
such as "sibling" make sense.
* "Default attribute values in DTDs" is this actually implemented
anywhere? I would prefer we make no requirements on this one way or
another. Seems like something we might want to simplify down the line.
* Actually, the way classes and IDs are proposed to work is with a
generic class="" and id="" attribute defined by DOM. HTML, SVG,
MathML, xml:id, are all irrelevant.
* Can we settle on the name :any-link so Gecko can remove the prefix?
* :hover should mention that the specifics of hit testing are not
defined (but should be at some point). Suggesting it's as simple as a
box the mouse is hovering over is misleading.
* Same comment for :active, :dag, and :drop.
* It seems like :current could use some elaboration. E.g. that its
behavior depends entirely upon context that is not provided by this
specification. Same for :past and :future.
* In :root it has "In HTML 4" which seems bad. HTML4 is dead and with
scripting that's not true. You probably want to clarify it only
matches the root element of Document objects.
* DOM no longer has CDATA nodes. Seems inappropriate for :empty to mention them.
* Why is parsing a selector an API hook? Are other parts of CSS not
using those parsers?


-- 
http://annevankesteren.nl/

Received on Thursday, 10 April 2014 14:18:32 UTC