2 ms·
Hi thanks for looking. Could you elaborate on your last statement?
by peterchon 11y ago
Hi thanks for looking. Could you elaborate on your last statement?
- Raphmedia 11y agoSorry, I was wrong. It seem that they cannot start with a number but you can use a number in them so long as your class start with a valid character. I'm however worried at the use of the : character. The style definition might be ignored in some browsers. Some other might break when they see an invalid character and stop parsing your styles. That being said, most modern browser will be able to parse the CSS without you needing to escape any characters.
- oneeyedpigeon 11y agoI don't think there's anything invalid about the colon character in a classname. It's unusual sure, and probably not recommended (it has to be escaped in selectors, for one, which is a bit of a pain) but if it causes any tools to break, I think that's the fault of the tool.
- peterchon 11y agoof course, and I completely agree. I started off using a hyphen, but tried a colon just to make it look similar to inline-css.