The stylesheet
One small file styles the three built-ins and nothing else. Load it in your template:
{% load static %}
<link rel="stylesheet" href="{% static 'dj_spellbook/spellbook.css' %}">
The variables
It reads eight variables, set on :root:
| Variable | Default |
|---|---|
--spell-radius | 6px |
--spell-gap | 1rem |
--spell-border | #d0d4da |
--spell-surface | #f7f8fa |
--spell-info | #2f6fb3 |
--spell-warning | #b7791f |
--spell-success | #2f855a |
--spell-danger | #c53030 |
The four colour variables give each alert type its left edge.
Overriding it
Set the variables, or override the rules, in your own CSS loaded after it:
:root {
--spell-radius: 0;
}
The file sets one value for each variable and has no dark theme of its own. A site with a dark theme sets the variables again under its own dark rule.
Leaving it out
The file is optional. A block you write yourself carries your own classes and your own CSS, and needs nothing from this one. The built-ins keep their stable class names with or without it.