-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add tests for element/attribute name selectors in HTML #13738
base: master
Are you sure you want to change the base?
Add tests for element/attribute name selectors in HTML #13738
Conversation
html/semantics/selectors/case-sensitivity-of-selectors/name-selectors.html
Outdated
Show resolved
Hide resolved
455f020
to
28cb054
Compare
<!doctype html> | ||
<title>Test whether namespace prefixes are lowercased</title> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this test really belong in css/css-namespaces[1], and isn't this already covered by css/css-namespaces/prefix-001.xml ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is testing:
When comparing a CSS element type selector to the names of HTML elements in HTML documents, the CSS element type selector must first be converted to ASCII lowercase. The same selector when compared to other elements must be compared according to its original case. In both cases, the comparison is case-sensitive.
Specifically because of whatwg/html#4155, and whether the whole CSS Qualified Name is lowercased or whether it's just the local part.
Therefore it's different to css/css-namespaces/prefix-001.xml
because it's an HTML element in an HTML document.
Let me add a comment to clarify this.
<meta charset=utf8> | ||
<title>CSS element selector case-sensitivity</title> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a <link rel=help>
with the relevant spec-link?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you don't know, for HTML you can always take the last path segment as a fragment (i.e., #case-sensitivity-of-selectors).
<meta charset=utf8> | ||
<title>CSS attribute name selector case-sensitivity</title> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a <link rel=help>
with the relevant spec-link?
Inspired by whatwg/html#3372. This tests the current spec.