Bulma has two variable files divided into 4 sections:
-
Initial variables: where you define variables by literal value, like:
- colors:
{{ initial_vars['$blue'].name }}: {{ initial_vars['$blue'].value }}
- font sizes:
{{ initial_vars['$size-1'].name }}: {{ initial_vars['$size-1'].value }}
- dimensions:
{{ initial_vars['$gap'].name }}: {{ initial_vars['$gap'].value }}
- other values:
{{ initial_vars['$easing'].name }}: {{ initial_vars['$easing'].value }}
or{{ initial_vars['$radius-large'].name }}: {{ initial_vars['$radius-large'].value }}
- colors:
-
Derived variables where variables are calculated from the values set in the previous file. For example, you can have:
-
Primary colors derived from the initial variables:
{{ derived_vars['$primary'].name }}: {{ derived_vars['$primary'].value }}
{{ derived_vars['$link'].name }}: {{ derived_vars['$link'].value }}
{{ derived_vars['$info'].name }}: {{ derived_vars['$info'].value }}
{{ derived_vars['$success'].name }}: {{ derived_vars['$success'].value }}
{{ derived_vars['$warning'].name }}: {{ derived_vars['$warning'].value }}
{{ derived_vars['$danger'].name }}: {{ derived_vars['$danger'].value }}
{{ derived_vars['$dark'].name }}: {{ derived_vars['$dark'].value }}
{{ derived_vars['$text'].name }}: {{ derived_vars['$text'].value }}
{{ derived_vars['$background'].name }}: {{ derived_vars['$background'].value }}
: a general background color{{ derived_vars['$link'].name }}: {{ derived_vars['$link'].value }}
: the links use the primary color{{ derived_vars['$family-primary'].name }}: {{ derived_vars['$family-primary'].value }}
: the primary font family is the sans-serif one-
Lists and maps which are collections of already defined variables:
{{ derived_vars['$colors'].name }}: {{ derived_vars['$colors'].value }}
{{ derived_vars['$shades'].name }}: {{ derived_vars['$shades'].value }}
{{ derived_vars['$sizes'].name }}: {{ derived_vars['$sizes'].value }}
-
Primary colors derived from the initial variables:
To override any of these variables, just set them before importing Bulma.