[csswg-drafts] Allow comment indicators (`/*` and `*/`) to be nested. (#10768)

RokeJulianLockhart has just created a new issue for https://github.com/w3c/csswg-drafts:

== Allow comment indicators (`/*` and `*/`) to be nested. ==
#### **Prerequisites**

1. #### **Specification Name and URI**

 > Please tag the issue title with the spec's short name, like `[css-foo]` (this is the name from the spec URL, without a level number unless the issue is specific to that level). If you're proposing a new feature that doesn't obviously fit in an existing spec, skip this part — don't make something up.

 > Please link to the spec section you're talking about, or at least the spec.

 I think this could reasonably be attributed to [*CSS Syntax Module Level 3*](https://www.w3.org/TR/css-syntax-3/#consume-comment:~:text=If%20the%20next%20two%20input%20code%20point%20are%20U+002F%20SOLIDUS%20(/)%20followed%20by%20a%20U+002A%20ASTERISK%20(*)%2C%20consume%20them%20and%20all%20following%20code%20points%20up%20to%20and%20including%20the%20first%20U+002A%20ASTERISK%20(*)%20followed%20by%20a%20U+002F%20SOLIDUS%20(/)%2C%20or%20up%20to%20an%20EOF%20code%20point.%20Return%20to%20the%20start%20of%20this%20step):

 > If the [next two input code point](https://www.w3.org/TR/css-syntax-3/#next-input-code-point) are U+002F SOLIDUS (/) followed by a U+002A ASTERISK (*), consume them and all following [code points](https://infra.spec.whatwg.org/#code-point) up to and including the first U+002A ASTERISK (*) followed by a U+002F SOLIDUS (/), or up to an EOF code point. Return to the start of this step.

1. #### **Improvement**

 > Please be specific (in the title and issue) about what you want to change: “make it better” means different things to different people!

 I cannot utilize a custom tag like I can in HTML (`<comment>`, for instance) which means that for this functionality, I am dependent upon preprocessors, like LESS. However, that's not applicable to mere HTML files.

 Luckily, some IDE extensions automatically break the tags in non-standardized manners, like https://github.com/philsinatra/NestedCommentsVSCode/blob/9c25135847af99c89e66b14e7396a3bf2b0d7cf0/README.md#html-syntax:~:text=Examples-,HTML%20Syntax,%3C/main%3E%20%2D%2D%3E,-CSS%20Syntax. However, this is again a problematic barrier to entry, because it assumes that the user's IDE is advanced enough to:

 1. Provide this functionality.
 1. Automatically make the necessary modifications as sections are uncommented and commented, lest the user need to constantly invoke the relevant command.

 Other languages, like PowerShell and C++, partially remediate this by providing a non-inline comment indicator. However, this isn't applicable to CSS by design, for it would break its ability to be entirely minified. Consequently, the sole alternative is to permit nested comments.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10768 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 22 August 2024 13:29:05 UTC