You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the Value Syntax Definition, nothing says that such a reference to a data type needs to be only composed of characters that match [a-zA-Z0-9\-], as the parser seems to assume. Granted, that's been the case until now across CSS specifications...
Problem is this construct is now used to define the :nth selector in the CSS Generated Content for Paged Media Module spec in particular, where it is to be interpreted as a reference to the basic data type <an+b>.
The text was updated successfully, but these errors were encountered:
The substitution of <an+b> with <an-plus-b> in mdn/data and CSSTree is a practical solution, eliminating the need for parsing exceptions or rule modifications for this infrequently used syntax. While adding an exception or expanding the ident character set are alternatives, adopting <an-plus-b> uniformly ensures parsing consistency and simplicity. However, discussable, I have no strong opinion here.
Interesting fact that the Selectors spec doesn't refer to <an+b> production:
Yes, we have a workaround in place for Webref data (which gets injected into mdn/data). Now, the single source of truth is supposed to be the spec. Ideally, that source would remain usable. I raised w3c/csswg-drafts#9473 against the definition to suggest <an-plus-b> as an alternative.
The following code throws a SyntaxError:
Error is:
Looking at the Value Syntax Definition, nothing says that such a reference to a data type needs to be only composed of characters that match
[a-zA-Z0-9\-]
, as the parser seems to assume. Granted, that's been the case until now across CSS specifications...Problem is this construct is now used to define the
:nth
selector in the CSS Generated Content for Paged Media Module spec in particular, where it is to be interpreted as a reference to the basic data type<an+b>
.The text was updated successfully, but these errors were encountered: