O'Reilly logo

Jump Start Sass by Miriam Suzanne, Hugo Giraudel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3Variables

Variables are at the core of most—if not all—programming languages that ever existed. A variable, broadly speaking, is a storage location paired with an associated identifier (aka a variable name). So a variable is basically made up of a key and a value, the former being used to retrieve the latter.

When applied to Sass, variables give authors the ability to store bits of content so that they can be reused throughout the stylesheets. This is especially handy for colors: one can avoid having countless hues of the same color after a long time spent working on a project. Variables can also be helpful for storing other types of content such as font lists, maps of breakpoints, and default asset paths—presumably anything that you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required