3 ms·
Is there a chance you mostly program in languages where camelCase is common? For me as a C programmer / Javascript programmer both are readable. I think hyphen
by Danieru 12y ago
Is there a chance you mostly program in languages where camelCase is common? For me as a C programmer / Javascript programmer both are readable.
I think hyphens are useful in css to keep the namespace non-confusable with the javascript.
- moron4hire 12y agoThat's actually where I mix the two uses. CSS class names, I use hyphens, because what CSS calls a class is not the same thing as what Javascript calls a class. DOM element IDs, I use camel case, because it's likely to also be the variable name I use on the Javascript side to hold the reference to the DOM element.