From 5ac8b604faa6acc318d22ace09a9b4f639ac36cb Mon Sep 17 00:00:00 2001
From: Tony Ruscoe
Separate words in ID and class names by a hyphen.
+ +Do not concatenate words and abbreviations in selectors by any characters +(including none at all) other than hyphens, in order to improve understanding +and scannability.
+ +/* Not recommended: does not separate the words “demo” and “image” */
+.demoimage {}
+
+/* Not recommended: uses underscore instead of hyphen */
+.error_status {}
+
+
+/* Recommended */
+#video-id {}
+.ads-sample {}
+
+
+Prefix selectors with an application-specific prefix (optional).
+ +In large projects as well as for code that gets embedded in other projects or on +external sites use prefixes (as namespaces) for ID and class names. Use short, +unique identifiers followed by a dash.
+ +Using namespaces helps preventing naming conflicts and can make maintenance +easier, for example in search and replace operations.
+ +.adw-help {} /* AdWords */
+#maia-note {} /* Maia */
+
+
Avoid qualifying ID and class names with type selectors.
@@ -614,41 +649,6 @@ color: #eebbcc; color: #ebc; -Prefix selectors with an application-specific prefix (optional).
- -In large projects as well as for code that gets embedded in other projects or on -external sites use prefixes (as namespaces) for ID and class names. Use short, -unique identifiers followed by a dash.
- -Using namespaces helps preventing naming conflicts and can make maintenance -easier, for example in search and replace operations.
- -.adw-help {} /* AdWords */
-#maia-note {} /* Maia */
-
-
-Separate words in ID and class names by a hyphen.
- -Do not concatenate words and abbreviations in selectors by any characters -(including none at all) other than hyphens, in order to improve understanding -and scannability.
- -/* Not recommended: does not separate the words “demo” and “image” */
-.demoimage {}
-
-/* Not recommended: uses underscore instead of hyphen */
-.error_status {}
-
-
-/* Recommended */
-#video-id {}
-.ads-sample {}
-
-
Avoid user agent detection as well as CSS “hacks”—try a different approach