{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/csswg-drafts/issues/534","repository_url":"https://api.github.com/repos/w3c/csswg-drafts","labels_url":"https://api.github.com/repos/w3c/csswg-drafts/issues/534/labels{/name}","comments_url":"https://api.github.com/repos/w3c/csswg-drafts/issues/534/comments","events_url":"https://api.github.com/repos/w3c/csswg-drafts/issues/534/events","html_url":"https://github.com/w3c/csswg-drafts/issues/534","id":179309841,"number":534,"title":"[css-selectors] Support `.` (dot) notation for non-XHTML namespaces","user":{"login":"sebastien","id":14598,"avatar_url":"https://avatars.githubusercontent.com/u/14598?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastien","html_url":"https://github.com/sebastien","followers_url":"https://api.github.com/users/sebastien/followers","following_url":"https://api.github.com/users/sebastien/following{/other_user}","gists_url":"https://api.github.com/users/sebastien/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastien/subscriptions","organizations_url":"https://api.github.com/users/sebastien/orgs","repos_url":"https://api.github.com/users/sebastien/repos","events_url":"https://api.github.com/users/sebastien/events{/privacy}","received_events_url":"https://api.github.com/users/sebastien/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-26T18:59:14Z","updated_at":"2016-09-26T19:48:42Z","closed_at":null,"body":"Regarding https://drafts.csswg.org/selectors-4/#class-html\r\n\r\nBrowsers currently render CSS stylesheets using the `.classname` (*dot notation*) differently from the `[class~=\"classname\"]` notation depending on the node's namespace.\r\n\r\nFor instance, Firefox treats both cases the same for non-XHTML XML nodes while Chrome only applies the `[class~=...]` form in http://ffctn.com/doc/chrome-test-style.xml\r\n\r\nThe issue has been around for a while (see [Bugzilla #7758](https://bugzilla.mozilla.org/show_bug.cgi?id=7588) and [Chromium #69444](https://bugs.chromium.org/p/chromium/issues/detail?id=649444#c6)), and boils down to this:\r\n\r\n- The [spec is clear](https://bugzilla.mozilla.org/show_bug.cgi?id=7588#c2) in saying that dot-notation is meant for (X)HTML nodes\r\n- However, the common practice is that developers prefer/use the dot-notation\r\n- Developers willing to use CSS stylesheets for non-XHTML namespace XML currently can't reliably use the dot-notation because of the different interpretations by browsers\r\n- As a result, one option to do so would be to write the CSS in dot-notation and then transpile it to `[class=~...]` notation, which would lead to having either two stylesheets (one per notation) or a default stylesheet in `[class=~...]` notation instead of the dot-notation.\r\n\r\nGiven that the dot notation is an alternative syntax to the `[class=~...]` (at least according to [this comment](https://bugzilla.mozilla.org/show_bug.cgi?id=7588#c2)), it would be good if it had the same treatment across all browsers.\r\n\r\nUltimately, I feel XML does not deserve to be treated as a second-class citizen of the web, and would benefit get the same level of tooling support as HTML. Maybe the spec can help by clarifying that if an XML node has a `class` attribute, then any corresponding dot-notation CSS selector should match?\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/w3c/csswg-drafts/issues/comments/249677218","html_url":"https://github.com/w3c/csswg-drafts/issues/534#issuecomment-249677218","issue_url":"https://api.github.com/repos/w3c/csswg-drafts/issues/534","id":249677218,"user":{"login":"dbaron","id":248721,"avatar_url":"https://avatars.githubusercontent.com/u/248721?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaron","html_url":"https://github.com/dbaron","followers_url":"https://api.github.com/users/dbaron/followers","following_url":"https://api.github.com/users/dbaron/following{/other_user}","gists_url":"https://api.github.com/users/dbaron/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaron/subscriptions","organizations_url":"https://api.github.com/users/dbaron/orgs","repos_url":"https://api.github.com/users/dbaron/repos","events_url":"https://api.github.com/users/dbaron/events{/privacy}","received_events_url":"https://api.github.com/users/dbaron/received_events","type":"User","site_admin":false},"created_at":"2016-09-26T19:48:42Z","updated_at":"2016-09-26T19:48:42Z","body":"I think the relevant parts are probably its [definition of ID (and the note following)](https://dom.spec.whatwg.org/#concept-id) and its [definition of className and classList (and the note following)](https://dom.spec.whatwg.org/#dom-element-classname)."}}
{"actor":{"display_login":"dbaron"}}