60 CSS Coding Style Guide Examples For Developers
60 CSS Coding Style Guide Examples For Developers
CSS files. They can get messy and unreadable real fast.
There are plenty of guides and tutorials out there on how best to write
maintainable and clean code. Obviously important if you are working in a
team on a large project.
But does it really matter when you are a one person operation, working
on small client projects like portfolio sites?
You can come up with a list of rules to follow that make sense for
yourself, but itʼs a good idea to see what best practices other developers
are using.
5. Code Style Guide: CSS from Thinkup.com (now shutdown, but the
style guide at Github is still valuable).
10. Great article detailing the history and evolution of Medium.comʼs CSS
styling. Contains complete CSS style guides from 4 different eras.
11. The Salesforce Lightning Design System‘s markup and style guide.
14. Harry Robertsʼ 2012 article My HTML/CSS coding style on his CSS
Wizardry site is mostly out of date, but still instructive.
17. Drupal.org CSS Coding Standards. CSS coding guide and best
practices for Drupal.
19. CSS and LESS Coding Standards from Run Open Code.
20. The Moodle LMS CSS coding style guide describes style guidelines
for developers working on or with Moodle code.
22. CKAN CSS coding standard doc. (CKAN is an open-source tool for
making open data websites).
28. BBC Cascading Style Sheets (CSS) Standard. describes the use of
Cascading Style Sheets on bbc.co.uk web pages.
29. The Guardianʼs Base CSS style guide.
30. Yelpʼs SCSS styleguide covers mixins for flexbox, animations, grids
and other markup.
31. CSS features and coding standards for Phabricator, a set of tools for
developing software.
33. 18F CSS coding styleguide. 18F is an office inside the U.S. General
Services Administrationʼs Technology Transformation Service that helps
other federal agencies build, buy, and share efficient and easy-to-use
digital services.
34. Trelloʼs CSS Guide on GitHub. “CSS guides are a big deal, hugely
important. If you donʼt have a CSS guide, you should be panicking,”
writes Bobby Grace in a post about the style guide.
37. Styleguide for Primer, GitHubʼs internal CSS framework. And a 2014
post by Mark otto on GitHubʼs CSS.
38. Polymer uses shadow DOM styling rules for providing styling of the
elementʼs local DOM.
46. Mark Brown, front end developer form Melbourne has a css style
guide on his site. http://www.yellowshoe.com.au/standards/#css
49. Guidelines and best practices for the front-end web development
team at Isobar.
51. Personal style guide for oli.jp, website of Oli Studholme, a designer in
Osaka, Japan.
53. Dropbox (S)CSS Style Guide. “Every line of code should appear to be
written by a single person, no matter the number of contributors.” —
@mdo
54. Reasonable System for CSS Stylesheet Structure. “Styling CSS
without losing your sanity”
TL;DR: For most people, just read the guide linked to in #1 and follow the
recommendations. Use them as a baseline to develop your own personal
CSS coding style standard.