This is a document for containing the coding style guides at Greenfox's Velox class. Currently covers:
- HTML
- CSS
- Python
- Javascript
https://google.github.io/styleguide/htmlcssguide.xml
- HTML
- Optional Tags
- CSS
- Declaration Order
- HTML
- Self closing slashes
/
forvoid
HTML tags are optional in HTML5, be consistent, either use it in everyvoid
tag or in none- we will democratically agree to use it nowhere
- list of
void
tags in HTML5: https://www.w3.org/TR/html-markup/syntax.html#syntax-elements
<!-- Good --> <link name="value"> <img src="value"> <!-- Bad --> <link name="value"></link> <img src="value"/>
- Self closing slashes
- CSS
- Use
::
instead of:
on pseudo element selectors. Eg.:
/* Good */ .my-class::after { content: "apple"; } /* Bad */ .my-class:after { content: "apple"; }
- Use