whatwg / html

HTML Standard
https://html.spec.whatwg.org/multipage/
Other
8.07k stars 2.65k forks source link

Case sensitivity of namespaced attributes in CSS attr() #2738

Open zcorpan opened 7 years ago

zcorpan commented 7 years ago

In https://github.com/whatwg/html/issues/2694#issuecomment-302885830 @SimonSapin wrote:

It may make sense to make a similar change here for consistency, though this case is less annoying to implement since (unlike attribute selectors) attr() does not support *|foo namespace wildcards, so case-sensitivity is decidable before attribute lookup.

From a consistency point of view, I think we should do this. But it's worth checking what browsers do first.

zcorpan commented 7 years ago

(If we decide to not change attr(), then the note needs to be updated.)

zcorpan commented 7 years ago

Also, I forgot about the following in https://github.com/whatwg/html/pull/2700

would be nice to make it clear that it's attributes in any namespace.

zcorpan commented 7 years ago

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/5230

Chromium/WebKit/EdgeHTML 15 don't support matching a namespaced attribute with attr() at all, it seems. Gecko compares lowercased local name.

zcorpan commented 7 years ago

For no-namespace attributes and attr() without using namespace prefix, we have interop on comparing lowercase local name.

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/5231