#33689: Django theme color variables are inconsistently named and poorly
documented
-------------------------------------+-------------------------------------
Reporter: Murray Chapman | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: contrib.admin | Version: 4.0
Severity: Normal | Resolution:
Keywords: theme dark mode | Triage Stage: Accepted
color variables documentation |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Michael):
I agree with the original poster. It takes a bit of trial and error to
skin the admin. Sometimes you skin something in one situation, and then
the same variable is used elsewhere, and then it clashes (doesnt work
visually) down the line. I also have had clashes with Django CSS custom
property names.
Just a side comment: In the web framework context, it is a common pattern
to use a two letter acronym for namespacing, e.g. `tw` for tailwind, `ng`
for angular. We could prefix all variables with `dj`. e.g. ` --dj-body-
fg`.
Another solution would be to place properties under a top level admin
container instead of `:root`, e.g.
{{{
.admin-top-level-container {
--body-fg: black;
}
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33689#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701847b5a3ed6-0fa1f98b-4fa8-4d5b-a006-f6faa443a15f-000000%40eu-central-1.amazonses.com.