]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fixes #11795: Update the contributing guidelines to include some more CSS guidelines
authorMark Otto <otto@github.com>
Sun, 15 Dec 2013 21:39:45 +0000 (13:39 -0800)
committerMark Otto <otto@github.com>
Sun, 15 Dec 2013 21:39:45 +0000 (13:39 -0800)
CONTRIBUTING.md

index 708ace7ec9005390753178b36767b30a6c468a79..21062d9f1bceb5d19be893419168b86716a793b3 100644 (file)
@@ -37,12 +37,15 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso
 
 ### CSS
 
-- Adhere to the [RECESS CSS property order](http://markdotto.com/2011/11/29/css-property-order/)
+- Adhere to the [CSS property order](http://markdotto.com/2011/11/29/css-property-order/)
 - Multiple-line approach (one property and value per line)
 - Always a space after a property's colon (e.g., `display: block;` and not `display:block;`)
 - End all lines with a semi-colon
 - For multiple, comma-separated selectors, place each selector on its own line
 - Attribute selectors, like `input[type="text"]` should always wrap the attribute's value in double quotes, for consistency and safety (see this [blog post on unquoted attribute values](http://mathiasbynens.be/notes/unquoted-attribute-values) that can lead to XSS attacks).
+- Attribute selectors should only be used where absolutely necessary (e.g., form controls) and should be avoided on custom components for performance and explicitness.
+- Series of classes for a component should include a base class (e.g., `.component`) and use the base class as a prefix for modifier and sub-components (e.g., `.component-lg`).
+- Avoid inheritance and over nesting—use single, explicit classes whenever possible.
 
 ### JS