Skip to content

Instantly share code, notes, and snippets.

@vades
Last active May 21, 2019 06:32
Show Gist options
  • Save vades/4e835219ef63c5a756bf6cf8e83793a3 to your computer and use it in GitHub Desktop.
Save vades/4e835219ef63c5a756bf6cf8e83793a3 to your computer and use it in GitHub Desktop.
How to structure SASS project

SASS directory structure

Core

Contains SASS variables, functions, mixins, config and other stuff.

Base

Contains the project boilerplate code such as typo, resets, dimensions, media queries, colors and other helpers that are commonly shared among the entire project.

Layout

Holds all files that handle the layout, such as content, sidebars, header and footer.

Components

Contains all independent parts (modules) such as inputs, buttons, tables, accordions and many other components.

Custom

Holds custom code for specific project needs.

Vendor

Holds all third party code from external libraries

sass

  • core
    • mixins
      • _mixin-1.scss
      • _mixin-2.scss
      • _mixin-3.scss
      • ...
    • variables
      • _colors.scss
      • _variables.scss
      • _media-queries.scss
      • ...
  • base
    • _base.scss
    • _typo.scss
    • _dimensions.scss
    • ...
  • layout
    • _body.scss
    • _footer.scss
    • _header.scss
    • ...
  • components
    • _accordion.scss
    • _alert.scss
    • _form.scss
    • ...
  • vendor
    • normalize.scss
    • ...
  • custom
    • _colors.scss
    • _variables.scss
    • _header.scss
    • ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment