[PR #4940] [MERGED] Add dynamic CSS support #23065

Closed
opened 2026-05-16 05:44:50 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/4940
Author: @BlackDex
Created: 9/11/2024
Status: Merged
Merged: 11/11/2024
Merged by: @BlackDex

Base: mainHead: dynamic-css


📝 Commits (4)

  • 4ea04e4 Add dynamic CSS support
  • a1f5238 Add versions and fallback to built-in
  • 698f0c7 Fix fallback code to actually work
  • 0b91254 Updated the wiki link in the user template

📊 Changes

6 files changed (+266 additions, -4 deletions)

View changed files

📝 Cargo.lock (+43 -0)
📝 Cargo.toml (+3 -0)
📝 src/api/web.rs (+100 -3)
📝 src/config.rs (+14 -1)
src/static/templates/scss/user.vaultwarden.scss.hbs (+1 -0)
src/static/templates/scss/vaultwarden.scss.hbs (+105 -0)

📄 Description

Together with https://github.com/dani-garcia/bw_web_builds/pull/180 this PR will add support for dynamic CSS changes.

For example, we could hide the register link if signups are not allowed. In the future show or hide the SSO button depending on if it is enabled or not.

There also is a special user.vaultwarden.scss file so that users can add custom CSS without the need to modify the default (static) changes. This will prevent future changes from not being applied and still have the custom user changes to be added.

Also added a special redirect when someone goes directly to /index.html as that might cause issues with loading other scripts and files.

This is still a WIP to fine tune and add some more dynamic options where applicable.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/4940 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 9/11/2024 **Status:** ✅ Merged **Merged:** 11/11/2024 **Merged by:** [@BlackDex](https://github.com/BlackDex) **Base:** `main` ← **Head:** `dynamic-css` --- ### 📝 Commits (4) - [`4ea04e4`](https://github.com/dani-garcia/vaultwarden/commit/4ea04e4fa635fc988ab8facade5a0ca1b3aa28ae) Add dynamic CSS support - [`a1f5238`](https://github.com/dani-garcia/vaultwarden/commit/a1f52380510cc483c390b72f938dc9370ca11209) Add versions and fallback to built-in - [`698f0c7`](https://github.com/dani-garcia/vaultwarden/commit/698f0c786cf3560976a84cf670febe6ffb1f4493) Fix fallback code to actually work - [`0b91254`](https://github.com/dani-garcia/vaultwarden/commit/0b912541213b94037c4c1a516f77fd734dd3fa49) Updated the wiki link in the user template ### 📊 Changes **6 files changed** (+266 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+43 -0) 📝 `Cargo.toml` (+3 -0) 📝 `src/api/web.rs` (+100 -3) 📝 `src/config.rs` (+14 -1) ➕ `src/static/templates/scss/user.vaultwarden.scss.hbs` (+1 -0) ➕ `src/static/templates/scss/vaultwarden.scss.hbs` (+105 -0) </details> ### 📄 Description Together with https://github.com/dani-garcia/bw_web_builds/pull/180 this PR will add support for dynamic CSS changes. For example, we could hide the register link if signups are not allowed. In the future show or hide the SSO button depending on if it is enabled or not. There also is a special `user.vaultwarden.scss` file so that users can add custom CSS without the need to modify the default (static) changes. This will prevent future changes from not being applied and still have the custom user changes to be added. Also added a special redirect when someone goes directly to `/index.html` as that might cause issues with loading other scripts and files. This is still a WIP to fine tune and add some more dynamic options where applicable. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-16 05:44:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#23065