django-treewidget icon indicating copy to clipboard operation
django-treewidget copied to clipboard

Django 3.2 admin dark mode

Open elmcrest opened this issue 4 years ago • 1 comments

Hey netzkolchose,

can you say something about the state of dark mode support? it seems you've already, at least, started with this and there are CSS files for dark mode, but somehow it's not getting used.

Would you consider to support this and update your package?

Thx so far, really cool widget, I'm using it in a playground prototype kind of thing with django-treebeard.

elmcrest avatar Jul 26 '21 15:07 elmcrest

That dark theme is a default one delivered with jstree. Never used it myself, thus it is possible, that it will not work out of the box (might need color fixes in default.css as well). You can activate it by explicitly setting $.jstree.defaults.core.themes.name to its theme name.

Imho to get the automatic switching as supported by Django 3.2+ more work is needed - you'd basically have to set the theme name during runtime based on the prefers-color-scheme media query. I have no system to test that, so please feel free to make a PR for that.

jerch avatar Jul 26 '21 18:07 jerch