Sass Values

What You’ll Learn
Every Sass expression produces a value. Most are familiar from CSS (numbers, strings, colors), some are Sass-only collections (lists and maps), and recent Dart Sass adds calculations plus first-class function, mixin, and module values.
$count: 3; // number
$name: "card"; // string
$brand: #036; // color
$sizes: 10px 20px 30px; // list
$theme: (primary: #036); // map
$visible: true; // boolean
$nothing: null; // null Value Index
Basic Values
The values you will use every day.
NumbersTutorialIntegers, decimals, and units.
StringsTutorialQuoted and unquoted text.
ColorsTutorialHex, rgb, hsl, and named colors.
BooleansTutorialtrue, false, and truthiness.
nullTutorialThe absence of a value.
Collections
Group several values together.
ListsTutorialSpace- and comma-separated sequences.
MapsTutorialKey-value pairs for tokens and config.
Calculated & First-Class Values
Newer value types for advanced stylesheets.
Frequently Asked Questions
Next: Sass Numbers
Start with the first tutorial in this section.
CODETOFUN NEWS
Stay Ahead in Tech
Get the latest IT news, programming updates, and technology trends directly on your phone.
Your daily dose of tech, straight to your feed.
6 people found this page helpful
