0
0
SASSmarkup~5 mins

String types and concatenation in SASS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What are the two main types of strings in Sass?
Sass has quoted strings (wrapped in single or double quotes) and unquoted strings (without quotes).
Click to reveal answer
beginner
How do you concatenate strings in Sass?
Use the #{} interpolation syntax inside strings or simply place strings next to each other with interpolation to join them.
Click to reveal answer
intermediate
What happens if you concatenate a quoted string with an unquoted string in Sass?
The result is a quoted string that combines both parts, preserving the quotes.
Click to reveal answer
beginner
Show an example of string interpolation in Sass.
Example: $name: "world"; .hello { content: "Hello, #{$name}!"; } outputs Hello, world! in CSS.
Click to reveal answer
beginner
Why is string interpolation useful in Sass?
It lets you insert variables or expressions inside strings, making styles dynamic and easier to maintain.
Click to reveal answer
Which of these is a quoted string in Sass?
Atrue
BHello
C123
D"Hello"
How do you combine two strings in Sass?
AUsing #{ } interpolation
BUsing + operator
CUsing & operator
DUsing * operator
What will this Sass code output? $greet: "Hi"; content: "#{$greet} there!";
AHi#{$greet} there!
BHi there!
C#{$greet} there!
DHi# there!
If you concatenate a quoted string and an unquoted string, what type is the result?
AQuoted string
BUnquoted string
CNumber
DBoolean
Which Sass feature allows inserting variables inside strings?
AMixins
BFunctions
CInterpolation
DNesting
Explain the difference between quoted and unquoted strings in Sass and how you can combine them.
Think about how quotes affect the string and how #{ } helps join strings.
You got /4 concepts.
    Describe how string interpolation works in Sass and why it is useful for styling.
    Remember the #{ } syntax inside strings.
    You got /3 concepts.