- From: François Daoust via GitHub <sysbot+gh@w3.org>
- Date: Mon, 16 Oct 2023 14:09:52 +0000
- To: public-css-archive@w3.org
tidoust has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-syntax-3] The `+` in `<an+b>` confuses parsing tools == The [`<an+b>` type](https://drafts.csswg.org/css-syntax-3/#the-anb-type) is defined with a production rule that starts with `<an+b> = ...`. This type is now referenced from the definition of [`:nth()`](https://drafts.csswg.org/css-gcpm/#selectordef-nth) in the CSS Generated Content for Paged Media Module. Problem is that the `+` confuses grammar parsers, including [CSSTree](https://github.com/csstree/csstree/issues/263) and the highlighting mechanism in Bikeshed (which creates a link to the definition of `+`), as they parse `+` as a [component value multiplier](https://drafts.csswg.org/css-values-3/#component-multipliers). The [Value Syntax Definition](https://drafts.csswg.org/css-values-3/#component-types) is not entirely clear about what characters can be used to define basic data types between `<` and `>` but it says: > Other non-keyword literal characters that may appear in a component value, such as “+”, must be written enclosed in single quotes. I think that's the only occurrence in CSS specs of a construct that parsers find problematic. Tools could be fixed of course, I'm wondering whether it would be ok to defined the type as `<an-plus-b>` instead. (If so, I'm happy to prepare a PR to update the specs that define or reference the type) Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9473 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 16 October 2023 14:09:54 UTC