Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the meaning of plus in SASS

Tags:

sass

I am reading the code of bulma and I am having trouble to understand the mening of "+" in front of a variable in SCSS

This is a code snippet using the "+" sign:

  +mobile
    &.is-narrow-mobile
      flex: none
    &.is-full-mobile

So what is it?

like image 772
Martin Andersen Avatar asked Mar 21 '17 16:03

Martin Andersen


People also ask

What is symbol in Sass?

Sass uses the $ symbol to make something a variable. Here's an example: SCSS. Sass.

What is & operator in SCSS?

The & is an extremely useful feature in Sass (and Less). It's used when nesting. It can be a nice time-saver when you know how to use it, or a bit of a time-waster when you're struggling and could have written the same code in regular CSS.

What are Sass variables?

Sass variables are used to store information that can be reused throughout the stylesheet when you need. You can store things like colors, font stacks, or any CSS value according to your future reusability. The $ symbol is used to make something a variable.

What are number operations in Sass?

SASS allows for mathematical operations such as addition, subtraction, multiplication and division. You cannot use incompatible units such as px * px or while adding number with px and em leads to produce invalid CSS. Therefore, SASS will display an error if you use invalid units in CSS.


1 Answers

It's the shorthand for @include when using the indented syntax.

You can also replace @mixin mixinName with =mixinName when declaring new mixins.

like image 109
robin Avatar answered Oct 18 '22 02:10

robin