Re: [csswg-drafts] [css-counter-styles-3] Setting `CSSCounterStyleRule.name` should exclude invalid `<custom-ident>` (#9363)

Hmmm. So, the reason it's written like that instead of parsing is because we generally don't like having to deal with CSS escapes in simple JS strings like this. Like, parsing as CSS means that `"\031 st" doesn't work, you need to double-escape it as `"\\03 st"`. And generally, the CSS parsing restrictions aren't really relevant here, since we're not in CSS. Being able to make a counter called "1st" should be easily doable in JS, even if you have to escape it in your stylesheet.

But we should update it to pick up the custom-ident restrictions, yeah.

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


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

Received on Friday, 15 September 2023 16:35:18 UTC