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 online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
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)