]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
code guide, fixes #14126
authorMark Otto <otto@github.com>
Sat, 12 Jul 2014 22:36:08 +0000 (15:36 -0700)
committerMark Otto <otto@github.com>
Sat, 12 Jul 2014 22:36:08 +0000 (15:36 -0700)
CONTRIBUTING.md

index 8c437df9af8d5de650980370f91c0886ab4d817c..c0c9820f6ded85327bc0f089dffecb52f1924d9e 100644 (file)
@@ -154,26 +154,16 @@ license your work under the terms of the [MIT License](LICENSE.md).
 
 ### HTML
 
-- Two spaces for indentation, never tabs.
-- Double quotes only, never single quotes.
-- Always use proper indentation.
+[Adhere to the Code Guide.](http://codeguide.co/#html)
+
 - Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags).
 - Use CDNs and HTTPS for third-party JS when possible. We don't use protocol-relative URLs in this case because they break when viewing the page locally via `file://`.
 - Use [WAI-ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) attributes in documentation examples to promote accessibility.
 
 ### CSS
 
-- CSS changes must be done in `.less` files first, never just in the compiled `.css` files.
-- 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.
-- Don't add vendor prefixed properties to their unprefixed counterparts (e.g., only `box-sizing` and not also include `-webkit-box-sizing`), as this is done automagically at build time.
-- 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.
+[Adhere to the Code Guide.](http://codeguide.co/#css)
+
 - When feasible, default color palettes should comply with [WCAG color contrast guidelines](http://www.w3.org/TR/WCAG20/#visual-audio-contrast).
 - Except in rare cases, don't remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](http://a11yproject.com/posts/never-remove-css-outlines/) for more details.