3 ms·
I've always wondered why they initially chose camelCase and not dashes. I like keeping camelCase for JS only. CSS uses dashes (border-top). LESS uses dashes in
by luigi 14y ago
I've always wondered why they initially chose camelCase and not dashes. I like keeping camelCase for JS only. CSS uses dashes (border-top). LESS uses dashes in its example documentation.
- apricot13 14y agobecause you can't double click on class names that contain dashes to quickly copy and paste them into your html. - do look neater but I wont switch because it frustrates me so much to not have that simple feature!
- harlanlewis 14y agoFunny, my editor usage is different, so I prefer dashes for the exact reason you don't. I use opt+(shift)+arrow keys to navigate and select words instead of mouse doubleclick. camelCase and under_scores both select the full string as a word. But if you throw some-dashes-in-there, and you're using the keyboard, it's super fast to select just the bits of the value you want. Without the dash, you have the select a character level to modify aspects of the string, which is fairly fiddly for being such a common task. A simple example of this being awesomely quick is adding a pre/postfix to values, eg: @color-link @color-link-hover @color-link-active