Skip to content

Variables

andreyover edited this page May 2, 2023 · 1 revision

SDP Variables

The SDP has variables, so far only at the global level. As it sounds, it is, nothing like that, just regular variables that can be used wherever you can write styles.

Creating variables

If you've read the wiki about templates, you probably already know what "immutable variables" ("single class") means.

Create a single class _vars and write template values into it:

_vars(my-var: white;)

Here we've created a variable my-var that can be used in the class:

$varclass(color: {my-var})

Now we have color in class $varclass with the value of my-var variable being white.

You can create as many variables as you want and store anything in them: fonts, links, or colors

Clone this wiki locally