Current File Stack
Our current structure has a common.css file that is used for all businesses and a dynamic.css file with a reset.css imported into it.
What we should have
We should be applying reset.css before the common.css to ensure that we are starting at an even playing field for all browsers.
camelCase, also known as lower camelCase, should be used for all id's and classes.
.contentWrap //styles here
.content_wrap //styles here .content-wrap //styles here
Think about long term maintanence when naming classes.
Always describe classes and id's based on what the are not what they look like.
*All css is written in SASS, which brings us to our next topic...
With great power comes great responsibility.
Do not nest more than three levels down to make your code more readable.
.contentWrap //Style here .content //style here .section //STOP!
Do not use !important
- !important is a band-aid.
- It is a solution that has not fixed the problem.
- If you find yourself needing to write !important on something it is probably not classified correctly in the html or their is CSS that does not belong in the common.