Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

the official name for this feature is CSS custom properties, but we’ll call them variables because that’s the closest thing CSS has to offer that looks like variables in a traditional language

tools = require('../js/tools'); tools.init()
Loading...

why

example 1: DRY

imagine you’d like to define a custom class:

let’s see how that can be done

tools.sample_from_stem('../samples/25-simple-vars', {'start_with': 'css'})
Loading...

example 2 (advanced)

imagine you’d like to define a custom header class:

so in other words, write a kind-of parameterized class, that can be tweaked from the outside

let’s see how that can be done

Loading...

how it works

see also