Frage

I'm attempting to re-learn 960gs using sass syntax. I am confused on the difference between "+" and "=" sass syntax. For example:

.wrapper
    +grid-container

and

.wrapper
    @include grid_container 

would produce the same results in my compiled css file

.wrapper {
  margin-left: auto;
  margin-right: auto;
  width: 960px;
}

So what is the difference between using "+" and "@include"?

War es hilfreich?

Lösung

No difference at all. Quoting Sass documentation:

Sass supports shorthands for the @mixin and @include directives. Instead of writing @mixin, you can use the character =; instead of writing @include, you can use the character +.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top