Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Suggestion for wording on class names and class names selection. #33

Closed
wants to merge 1 commit into from

2 participants

@AvnerCohen

A minor suggestion on the content, I think it's worth mentioning a convention for class names.
People should avoid camelCase and use dash-separated-lowercase-words.
Also, selection of class names should not be based on specific properties but rather the logical usage of the particular class.
This is described nicely here:
http://www.techrepublic.com/article/standardizing-css-class-and-id-names/5286783

The pull request is mainly to raise the suggestion, I'm not a native English speaker, so feel free to ignore the specifics of the wording used.

@necolas
Owner

Hi, please see #32. As for class names, this is a contentious issue but I have something planned. Thanks.

@necolas necolas closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 16, 2012
  1. @AvnerCohen
This page is out of date. Refresh to see the latest.
Showing with 17 additions and 0 deletions.
  1. +17 −0 README.md
View
17 README.md
@@ -252,6 +252,23 @@ Use clear and thoughtful names for HTML classes. Pick an understandable and
consistent naming pattern that makes sense both within HTML files and CSS
files.
+For class names and IDs declerations, use dash-separated-lowercase-words, use full words and don't be cheap on letters count.
+It is also better to try and use names that describes the logical usage of the class rather than it's properties (as these may change).
+For Example, avoid:
+
+```css
+.font-16px{
+ ...
+}
+```
+and prefer:
+```css
+.large-font{
+ ...
+}
+```
+
+
```css
/* Example of code with bad names */
Something went wrong with that request. Please try again.