Why do custom identifiers have such strict validation rules? #1176
Unanswered
kevinkucharczyk
asked this question in
Q&A
Replies: 1 comment 2 replies
-
@SombreroElGringo Is there a reason why the hyphen ( |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Recently, custom identifier hashing was added via #1160
However, the strings that are allowed for custom identifier functions are too restrictive. There is a regex match check here:
vanilla-extract/packages/css/src/identifier.ts
Line 78 in 58005eb
At the very least I'd like to be able to use hyphens, or escaped period characters, but CSS identifiers allow for more than that: https://stackoverflow.com/a/449000
Can the regex in custom identifiers be expanded to allow more characters? Is there a reason why this check is so strict?
Beta Was this translation helpful? Give feedback.
All reactions