Automatic Dark Mode based on System Settings

The color themes that currently ship with XWiki do not support automatic dark mode at the moment. Is there some extension I can download that enables this? Is this in the works perhaps? Any idea if this will be featured in any upcoming update?

It’s definitely an interesting feature but ATM this is not included in the XWiki roadmap and I don’t think it will be implemented in the short term, unless it’s sponsored by someone. Unfortunately I don’t know any extension that implements this either :frowning: . Wouldn’t hurt to report an idea / new feature regarding this on https://jira.xwiki.org .

Thanks,
Marius

By “automatic” I guess you mean if the OS supports it and it’s set, right? However, is there a java api for that?

XWiki does have a dark theme though that you can set and use.

It can be done with pure CSS. Please take a look into the prefers-color-scheme media query documentation. You may also check out this CSS Tricks article.

1 Like

Cool, it seems it’s quite widely supported by browsers:

Yes, it is quite the norm these days. Surprised to see that none of the official themes support it. Can we expect to see it implemented in any upcoming release? Thank you.

That depends. If you submit a pull request to implement it, then yes. If not, then someone needs to want to implement it on his/her own time and provide a pull request for it. Right now, I haven’t seen anyone suggesting they’d be either interested in this feature or saying they’re working to implement it.

Another solution to see it implemented, is what @mflorea suggested above, i.e. to sponsor it. See https://www.xwiki.org/xwiki/bin/view/Main/Support#HProfessionalSupport listing companies sponsoring the development of the XWiki project and themselves accepting sponsorings for features to develop. See https://dev.xwiki.org/xwiki/bin/view/Community/Contributing#HSponsoraFeatureorBug too.

Thanks

1 Like