Open
Conversation
Added the `css.preprocessorOptions.scss.silenceDeprecations` section to suppress warnings about deprecated Sass functions (`import`, `global-builtin`, `color-functions`, `if-function`). The `publicDir` setting has been disabled.
…module The outdated functions `darken()`, `lighten()`, `mix()`, `fade-out()`, and `saturate()` have been replaced with their modular equivalents `color.adjust()`, `color.change()`, and `color.mix()` from `sass:color`.
Dark theme support based on Bootstrap 5.3's `data-bs-theme` has been implemented: - A Stimulus controller named `theme` has been added to toggle and save the theme to localStorage - An inline script in <head> prevents flickering (FOUC) during loading - Theme toggle button (sun/moon) in the sidebar profile - Introduced the CSS variable --orchid-surface-bg and the utility class .bg-surface - Replaced hard-coded bg-white, $white, $black with CSS variables (var(--bs-body-bg), var(--bs-body-color), var(--bs-tertiary-bg), var(--bs-secondary-bg)) - Added the dark-mode.scss file with overrides for all Orchid components (tables, forms, buttons, modals, dropdowns, CodeMirror, Quill, Flatpickr, Tom Select, Select2, Dropzone, etc.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces full dark mode support for the Orchid admin panel, built on top of the Bootstrap 5.3 color mode mechanism (
data-bs-theme).Theme Toggle
theme_controller.js) handles toggling betweenlightanddarkthemes, persisting the user's choice inlocalStorage.<script>in<head>applies the saved (or OS-preferred) theme before first paint, preventing any flash of unstyled content (FOUC).CSS Architecture
--orchid-surface-bgCSS custom property and a.bg-surfaceutility class as the theme-aware replacement forbg-whiteacross all layout components (cards, tables, modals, filters, metrics, toasts, etc.).dark-mode.scsswith comprehensive overrides for all Orchid and third-party components: tables, forms, buttons, dropdowns, modals, list groups, CodeMirror, Quill, Flatpickr, Tom Select, Select2, Dropzone, Codeflask, and Leaflet.#fff,$white,$black) with CSS custom properties (var(--bs-body-bg),var(--bs-body-color),var(--bs-tertiary-bg),var(--bs-secondary-bg)) throughout form, reset, layout, and button styles.SCSS Modernization
darken(),lighten(),mix(),fade-out(),saturate()) to their modular equivalents fromsass:color(color.adjust(),color.change(),color.mix()).Cleanup
$modal-content-bgand$popover-bgvariables (now handled by Bootstrap's built-in dark mode).