You've already forked wp-bootstrap
v0.3.2 - Fix dark mode conflicts with WordPress global styles
Fix dark mode body colors overridden by WordPress theme.json styles.color, add broad dark mode rules for plugin form elements, fix footer-columns template, and add style variation bridge function. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -36,8 +36,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Offcanvas navigation dark mode compatibility
|
||||
// Force Bootstrap dark mode body colors past any WordPress global styles.
|
||||
// WordPress may output body { background-color: ...; color: ...; } via
|
||||
// global-styles that overrides Bootstrap's variable-based body styling.
|
||||
html[data-bs-theme="dark"] body {
|
||||
background-color: var(--bs-body-bg) !important;
|
||||
color: var(--bs-body-color) !important;
|
||||
}
|
||||
|
||||
// Dark mode for all form elements — catches plugin-generated controls
|
||||
// that lack Bootstrap's .form-select / .form-control classes.
|
||||
[data-bs-theme="dark"] {
|
||||
select,
|
||||
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
|
||||
textarea {
|
||||
background-color: var(--bs-body-bg);
|
||||
color: var(--bs-body-color);
|
||||
border-color: var(--bs-border-color);
|
||||
}
|
||||
|
||||
.offcanvas {
|
||||
--bs-offcanvas-bg: var(--bs-body-bg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user