You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.
Joshua Okoro edited this page Feb 17, 2020
·
2 revisions
What is a style guide?
A style guide is a set of standards that outline how code should be written and organized.
A style guide contains general rules about “how to write” code, e.g. which quotes to use, how many spaces to indent, where to put line breaks, etc. A lot of minor things.
Why a style guide is a must?
Each developer writes code differently. That’s fine until we are working on our code.
As count of developers increases 5->10->20->50, things get messy when all are working on a common codebase.
Style guides are created so new developers can get up to speed on a codebase quickly, and then write code that other developers can understand quickly and easily!
Expected style in a casing for Javascript and CSS:
CSS: hyphens
JS: camelCase
CSS class names should be hyphen separated.
Use hex code for color scheme throughout the application.
Avoid using px, em and use rem.
Use Single quotes throughout code
When using multiple selectors in a rule declaration, give each selector its own line.