Read more

Sass partial names must always start with an underscore

Dominik Schöler
July 09, 2014Software engineer at makandra GmbH

Be careful to name any file @imported by SASS with a leading underscore.

Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

SASS files not beginning with an underscore will be rendered on their own, which will fail if they are using variables or mixins defined elsewhere. (For me it broke only in production, which may be due to some settings in SASS-GEM/lib/sass/plugin/rails.rb.)

From the SASS docs Show archive.org snapshot :

The underscore lets Sass know that the file is only a partial file and that it should not be generated into a CSS file.

Posted by Dominik Schöler to makandra dev (2014-07-09 13:26)