-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Add dark mode support #35857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dark mode support #35857
Changes from 25 commits
5a343c8
eaa0869
d09cc90
3669ff8
17c3670
451e7c3
c95c068
5ee6ce5
65cce21
cd01c4b
bd303d8
ade37c1
71d0264
fd7580a
564c873
f09eb97
61cbd9d
3676c23
12d82b0
b99606b
1ffcbdf
508957c
1b63a98
36e2264
c59f429
adf418a
40dfd22
5031d41
d5b1b85
3917c03
9163b9f
0cffe85
f39e8d4
eba5fc6
afb664a
1c7b5ba
ad17750
b49a4c4
e3e4dba
aaf89f3
bd67392
1dbc505
d855319
3fe9bd3
59c2b32
1e24b69
0e4e0bb
58b9780
3493066
6e8e0b9
fccb28d
15c8d21
13438b7
a84e038
d83988a
cde601e
5746a4c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,18 +54,13 @@ | |
|
||
|
||
// scss-docs-start alert-modifiers | ||
// Generate contextual modifier classes for colorizing the alert. | ||
|
||
// Generate contextual modifier classes for colorizing the alert | ||
@each $state, $value in $theme-colors { | ||
julien-deramond marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Haven't looked at it yet but I'm afraid that https://deploy-preview-35857--twbs-bootstrap.netlify.app/docs/5.2/customize/sass/#add-to-map won't work anymore. |
||
$alert-background: shift-color($value, $alert-bg-scale); | ||
$alert-border: shift-color($value, $alert-border-scale); | ||
$alert-color: shift-color($value, $alert-color-scale); | ||
|
||
@if (contrast-ratio($alert-background, $alert-color) < $min-contrast-ratio) { | ||
$alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale)); | ||
} | ||
.alert-#{$state} { | ||
@include alert-variant($alert-background, $alert-border, $alert-color); | ||
--#{$prefix}alert-color: var(--#{$prefix}#{$state}-text); | ||
mdo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
--#{$prefix}alert-bg: var(--#{$prefix}#{$state}-bg-subtle); | ||
--#{$prefix}alert-border-color: var(--#{$prefix}#{$state}-border-subtle); | ||
--#{$prefix}alert-link-color: var(--#{$prefix}#{$state}-text); | ||
mdo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} | ||
// scss-docs-end alert-modifiers |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -210,7 +210,7 @@ | |
|
||
// Dark mode carousel | ||
|
||
.carousel-dark { | ||
%carousel-dark { | ||
.carousel-control-prev-icon, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On dark mode, it is very difficult to distinguish the normal color and the hovered one on the third slide There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noted, let's save for later with more feedback. |
||
.carousel-control-next-icon { | ||
filter: $carousel-dark-control-icon-filter; | ||
|
@@ -224,3 +224,15 @@ | |
color: $carousel-dark-caption-color; | ||
} | ||
} | ||
|
||
.carousel-dark { | ||
@extend %carousel-dark; | ||
} | ||
|
||
@if $enable-dark-mode { | ||
@include color-mode(dark) { | ||
.carousel { | ||
@extend %carousel-dark; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,18 @@ | |
} | ||
} | ||
|
||
.btn-close-white { | ||
%btn-close-white { | ||
filter: var(--#{$prefix}btn-close-white-filter); | ||
} | ||
|
||
.btn-close-white { | ||
@extend %btn-close-white; | ||
} | ||
|
||
@if $enable-dark-mode { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. create separate file like https://github.com/ColorlibHQ/AdminLTE/tree/v4-dev/src/scss/bootstrap-dark |
||
@include color-mode(dark) { | ||
.btn-close { | ||
@extend %btn-close-white; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,7 +75,7 @@ | |
margin-left: $pagination-margin-start; | ||
} | ||
|
||
@if $pagination-margin-start == ($pagination-border-width * -1) { | ||
@if $pagination-margin-start == calc($pagination-border-width * -1) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Except if you've found a non-working use case, this modification should be reverted (see a153f36). |
||
&:first-child { | ||
.page-link { | ||
@include border-start-radius(var(--#{$prefix}pagination-border-radius)); | ||
|
Uh oh!
There was an error while loading. Please reload this page.