Variables
In Jess, you can declare variables using the @let at-rule.
Note: variables at the root of the document are automatically exported (with export let).
Variables are referenced using the $ symbol.
Collections and Maps#
You can create a collection/map like this:
This can be referenced like a JS object (which it is), like this:
Theming#
Variables in Jess stylesheets are default values. Meaning that you can pass in new values to a stylesheet when @include-ing that stylesheet.
Say I have this stylesheet:
I can change the way it evaluates with the following:
This will produce the following: