Skip to content

nomensa/coding-standards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coding standards

This is the living document that is Nomensa's front-end coding standards. They are formed from various sources including our own preferred approach to front-end development.

Guiding principles

Progressive enhancement

Webpages should first work as plain HTML. A larger audience can read content inside of HTML, compared to CSS and JS. Technologies such as CSS and JS can be layered on top of HTML to enhance the user experience.

Further reading

Mobile first

Create your styles for the smallest device first and then progress to larger devices. This creates advantages for both developer and user:

  • CSS is inherited in larger devices without duplication of code;
  • Mobile devices will only load resources necessary for the device.

Further reading

DRY: Don't repeat yourself

Try to refactor code so that it is not repeated. Repeating code can affect the following aspects of the code:

  • Maintainability
  • Readability
  • Efficiency

Each one is as important the next and focusing on just one can detriment the other.

Further reading

Be consistent

Above all:

If you're editing code, take a few minutes to look at the code around you and determine its style. If they use spaces around all their arithmetic operators, you should too. If their comments have little boxes of hash marks around them, make your comments have little boxes of hash marks around them too. - Google HTML/CSS Style Guide

References

These coding standards have been inspired by great work from the following sources:

About

This is the living document that is Nomensa's front-end coding standards.

Resources

Stars

Watchers

Forks

Packages

No packages published