Skip to content

Commit

Permalink
Document some basic code conventions for us
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo committed Jan 13, 2021
1 parent 69afafe commit f8b8fc8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions site/content/docs/5.0/extend/approach.md
Expand Up @@ -76,3 +76,11 @@ Specifically regarding custom CSS, utilities can help combat increasing file siz
## Flexible HTML

While not always possible, we strive to avoid being overly dogmatic in our HTML requirements for components. Thus, we focus on single classes in our CSS selectors and try to avoid immediate children selectors (`>`). This gives you more flexibility in your implementation and helps keep our CSS simpler and less specific.

## Code conventions

[Code Guide](https://codeguide.co) (from Bootstrap co-creator, @mdo) documents how we write our HTML and CSS across Bootstrap. It specifices guidelines for general formatting, common sense defaults, property and attribute orders, and more.

We use [vnu-jar](https://www.npmjs.com/package/vnu-jar) to enforce standard and semantic HTML, as well as detecting common errors.

We use [Stylelint](https://stylelint.io) to enforce these standards and more in our Sass/CSS. [Our custom Stylelint config](https://github.com/twbs/stylelint-config-twbs-bootstrap) is open source and available for others to use and extend.

0 comments on commit f8b8fc8

Please sign in to comment.