How I organize my Sass projects
This is a basic writing on how I organize my Sass projects, mostly for self documentation.
I have two structures; mid and small-size projects. I work mostly for small business, so there is no need to over engineer my Sass code.
In both structures I use the same folders and each one have their own purpose.
When I don’t use Bower for third party libraries, this is the folder where they go.
Here are the files that have functions, mixins, extends, or classes that I use more than once in different folders.
Notice that if I use a mixin only once, I include it inside the file where is needed, for example I have a
button-generator mixin that I only use on
_bottons.scss, so I have it included in there only.
Core styles like
a tags, also the
table, for example. In other words, the foundation (not the framework) of the project.
Here are all the UI (User Interface) components that are required to use in the layout.
For example, we have the navigation that goes inside the header, or the buttons that goes almost on any part of the layout; header, main, footer, etc.
Header, footer, sidebar and other elements that makes the site structure.
As I mentioned before, the layouts are built with the help of the components. We can code the header using the
.social-icons classes (from the
components/ folder) and make them work together inside the
Page specific styles, for example:
The manifesto that include all the files to render the