4 ms·
.\31{width:5%} .\33{width:22%} .\34{width:30%} .\35{width:40%} .\32{width:15%} huh? can you tell me what those \31 \33 etc. mea
by smlckz 6y ago
.\31{width:5%}
.\33{width:22%}
.\34{width:30%}
.\35{width:40%}
.\32{width:15%}
huh? can you tell me what those \31 \33 etc. mean?
- juliend2 6y agoIt means: .1{width:5%} .3{width:22%} .4{width:30%} .5{width:40%} .2{width:15%} It's an escape sequence that lets you have non-alphabetic characters to start a CSS selector. See this for more examples: https://stackoverflow.com/a/35122909/242404 https://stackoverflow.com/a/35122909/242404
- duskwuff 6y agoEscapes for "1", "3", "4", "5", and "2". Probably a workaround for a CSS grammar issue that makes ".1{…}" not parse correctly?
- uryga 6y agoTIL! as with most languages, css indentifiers can't start with numbers, but you can get around that using backslash-escapes. you'd use these classes like this: <div class="35"> this stackoverflow answer has more info (looks like you can use any symbol you want, even spaces and [{}<>&*] !): https://stackoverflow.com/a/27882887/5534735 https://stackoverflow.com/a/27882887/5534735
- uryga 6y agojust realized my usage example is misleading. as sibling comments correctly explain, \35 means chr(0x35) == '\x35' == '5' so the actual usage would be <div class="5">