Aaron
Aaron

Reputation: 14029

Sass directives mixin, include, =, and +

I've been picking up Sass as I go on the project I'm working on and have noticed @mixin and @include being replaced with = and + respectively. I can't seem to find any information on these symbols as directives and sass-lang.com only makes mention to the @ prefixed directives.

Seeing these have brought up a few questions that I cannot seem to find answered here, on google, or at http://www.sass-lang.com.

  1. Is it good practice to use = and + over their longer equivalents?
  2. Are there any differences between using them and the @ directives?
  3. Are there any more directives that are replaced with symbols like @extend?
  4. Will these work with sass and scss / even if they do, which style is more common in which flavor of sass?

Upvotes: 0

Views: 485

Answers (1)

Tom Pietrosanti
Tom Pietrosanti

Reputation: 4294

This is old syntax for the .sass files (Pre SASS3)

see here under "Mixins": http://sass-lang.com/docs/yardoc/file.SCSS_FOR_SASS_USERS.html

Moving forward, you should use @mixin and @include, unless you have a reason for continuing to use the legacy format.

Upvotes: 2

Related Questions