3 ms·
No. As of 2022[1], the CSS spec defines a class-name (in a .css rule's selector) as "." + ident, and the lexical scanner rules for ident specifially allow any c
by kid64 3y ago
No. As of 2022[1], the CSS spec defines a class-name (in a .css rule's selector) as "." + ident, and the lexical scanner rules for ident specifially allow any character outside of 0x00-0x7F in a class name after an initial [_A-Za-z] character.
[1] https://www.w3.org/TR/selectors-3/#w3cselgrammar https://www.w3.org/TR/selectors-3/#w3cselgrammar
- dspillett 3y agoFrom my reading you can use any valid non-ascii character for the initial one too: ident [-]?{nmstart}{nmchar}* nmstart [_a-z]|{nonascii}|{escape} nonascii [^\0-\177] unicode \\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])? escape {unicode}|\\[^\n\r\f0-9a-f] nmchar [_a-z0-9-]|{nonascii}|{escape} (nmstart being the key definition for this point)
- WhatWorkingOn 3y agoSo why does this tailwind class fail? document.querySelector('.[&_a]:underline')