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?
Sass uses the $ symbol to make something a variable. Here's an example: SCSS. Sass.
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.
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.
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.
It's the shorthand for @include
when using the indented syntax.
You can also replace @mixin mixinName
with =mixinName
when declaring new mixins.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With