-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lowercasing of element type selectors #4155
Comments
web-platform-tests/wpt#13738 has tests for this, as well as plenty of other tests for the HTML ns specificity of this. |
In your example, the type selector is not Section 3.3 of css-namespaces-3 states that namespace prefixes are case-sensitive, so |
Per https://drafts.csswg.org/selectors/#type-selector @gsnedders is correct. It seems like we should write something like "ASCII lowercase type selector's identifier". Not sure what to write for attribute selectors though. |
So https://drafts.csswg.org/css-namespaces-3/#css-qualified-name makes me think we want "the CSS element type selector's local name must first be converted to ASCII lowercase", though the definition of local name (and namespace prefix) isn't defined as a term in Namespaces. |
Yeah, the namespace component is part of the type selector, per https://drafts.csswg.org/selectors/#type-nmsp. This subsection should probably be slightly rewritten to use terms from DOM, yeah? |
I stand corrected, @annevk @tabatkins, so is the DOM text just confusing in that case? |
@tabatkins the subsection in HTML or Selectors? I think Selectors could be clearer that a type selector is a struct that always has a name and sometimes a namespace (though perhaps it should be namespace prefix, it's a little unclear when resolution happens and what ends up in the data model). And then HTML could be updated to lowercase the type selector's name only. |
@annevk Is that any less clear than cases where DOM uses qualified names? I don't think it really is? |
@gsnedders yes, DOM has |
I think this should be fixed by using the wording @gsnedders proposes in #4155 (comment) . CSS Namespaces is fairly old,, so it doesn't have DFNs the way newer specs do (and it wasn't anticipated that a host language should be able to manipulate part of a qualified name e.g. by lowercasing it prior to matching, it's a pretty weird layering violation). But @gsnedders' wording seems pretty clear to me. |
Thanks! @gsnedders any chance we can convince you to turn that into a pull request? :) |
@domenic I meant to do that several weeks ago. I, uh, probably should. :) |
The spec currently says:
Selectors says:
As written, I believe this means that:
should be matched as
xhtml|span
.See also: #3372
The text was updated successfully, but these errors were encountered: