Sass supports a few operators that generate strings:
<expression> + <expression>
returns a string that contains both expressions’ values. If the either value is a quoted string, the result will be quoted; otherwise, it will be unquoted.
<expression> - <expression>
returns an unquoted string that contains both expressions’ values, separated by -
. This is a legacy operator, and interpolation should generally be used instead.
These operators don’t just work for strings! They can be used with any values that can be written to CSS, with a few exceptions:
It’s often cleaner and clearer to use interpolation to create strings, rather than relying on these operators.
Unary OperatorsUnary Operators permalinkFor historical reasons, Sass also supports /
and -
as a unary operators which take only one value:
/<expression>
returns an unquoted string starting with /
and followed by the expression’s value.-<expression>
returns an unquoted string starting with -
and followed by the expression’s value.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4