Re: [csswg-drafts] [css-selectors] Making the Tag-layer and ID-layer more powerful (#4690)

> According to the [HTML living standard](https://html.spec.whatwg.org/multipage/dom.html#the-id-attribute), IDs must be unique on a page:
> 
> > When specified on HTML elements, the id attribute value must be unique amongst all the IDs in the element's tree and must contain at least one character.

Right, but what Emilio referred to was that the [Selectors spec. also handles the case of invalid HTML documents defining multiple IDs](https://drafts.csswg.org/selectors-4/#id-selectors):

> An ID selector represents an element instance that has an identifier that matches the identifier in the ID selector. (It is possible in non-conforming documents for multiple elements to match a single ID selector.)

Sebastian

-- 
GitHub Notification of comment by SebastianZ
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4690#issuecomment-577335927 using your GitHub account

Received on Wednesday, 22 January 2020 19:02:55 UTC