Hey, hey, hey. May 1st has come and gone and those who have promised themselves to Reboot were either successful, or behind. One of the sites I’m curiously awaiting to check out is Bryan Veloso’s new rendition of AvalonStar.
I am trying to clean up and make things more efficient here at work. One goal would be to have a base CSS that will serve as a starting point for our Producers and Frontend peeps. Another goal would probably be a convention on how to use it and/or create new classes and IDs.
One of the things that keeps coming up lately would be the naming convention of classes and IDs. I used to implement this kind of format “class_name”. Then, only to switch to “class-name” in early ’06. Fast-forward to a couple of months into the year during a project, I came to find out that if you are referring to either a classname or an ID (i.e. getElementById, or something like that) that the value’s hyphen get stripped out. Can someone confirm this phenomena and/or myth? That is, for example, doing “id-name” would be implemented like so:
With that however, would it be more readable using a camelCased name? Although against Tantek’s step #4 in terms of saving the user(s) potential headaches. But would there be problems if there was a standard within one’s organization? That is, classes and IDs written as a variable, i.e. somethingLikeThis; no hyphens and no underscore.
I look forward to hearing your endless wisdom on this subject sirs and madams. Thanks in advance.
Let it be known that its All Saints Day today. That and I have finally and officially rebooted this blog to another life. Even though there are still some sub-pages being cranked out later down the week, it should be solid enough to get y’all through =)