Skip to content

luci-theme-material: add dark mode support#8551

Open
MagmaiKH wants to merge 1 commit intoopenwrt:masterfrom
MagmaiKH:magmaikh/material-dark-mode
Open

luci-theme-material: add dark mode support#8551
MagmaiKH wants to merge 1 commit intoopenwrt:masterfrom
MagmaiKH:magmaikh/material-dark-mode

Conversation

@MagmaiKH
Copy link
Copy Markdown

Pull Request details

Description

Add dark mode following the luci-theme-bootstrap pattern: auto-detect via prefers-color-scheme, with forced MaterialDark/MaterialLight variants. Replace ~60 hardcoded colors in cascade.css with CSS variables and override them in a :root[data-darkmode="true"] block.

Screenshot or video of changes (If applicable)

image

Maintainer (Preferred)

@systemcrash


Tested on

OpenWrt version:
24.10.6
LuCI version:
24.10

Web browser:
Firefox
Chrome


Checklist

  • [✅] This PR is not from my main or master branch 💩, but a separate branch. ✅
  • [✅] Each commit has a valid ✒️ Signed-off-by: <my@email.address> row (via git commit --signoff).
  • [✅] Each commit and PR title has a valid 📝 <package name>: title first line subject for packages.
  • [N/A] Incremented 🆙 any PKG_VERSION in the Makefile.

Add dark mode following the luci-theme-bootstrap pattern: auto-detect
via prefers-color-scheme, with forced MaterialDark/MaterialLight
variants. Replace ~60 hardcoded colors in cascade.css with CSS
variables and override them in a :root[data-darkmode="true"] block.

Signed-off-by: Shannon Barber <sgbarber@gmail.com>
Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one. Applied the files here, and it seems to work as intended.
Could not find any major issues when looking through briefly.

  • Safari Version 26.5 (21624.2.1.11.1)
  • LuCI openwrt-25.12 branch (26.100.49936~3cefdb7)
  • OpenWrt 25.12.2 (r32802-f505120278

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants