@@ -29,22 +29,28 @@ $green: #00bc8c !default;
2929$teal : #20c997 !default ;
3030$cyan : #3498db !default ;
3131
32+ // Body
33+
34+ $body-bg : $gray-900 !default ;
35+ $body-color : $white !default ;
36+ @function body-mix ($weight ) {
37+ @return mix ($body-bg , $body-color , $weight );
38+ }
39+
3240$primary : $blue !default ;
33- $secondary : $gray-700 !default ;
41+ $secondary : body-mix ( 85 % ) !default ;
3442$success : $green !default ;
3543$info : $cyan !default ;
3644$warning : $yellow !default ;
3745$danger : $red !default ;
38- $light : $gray-500 !default ;
39- $dark : $gray-800 !default ;
46+ // This is inconsistent with Bootstrap semantics. That is, $dark
47+ // should actually be a light color in a dark mode setting, :shrug:
48+ // https://github.com/thomaspark/bootswatch/issues/989
49+ $light : body-mix (65% ) !default ;
50+ $dark : body-mix (95% ) !default ;
4051
4152$min-contrast-ratio : 1.9 !default ;
4253
43- // Body
44-
45- $body-bg : $gray-900 !default ;
46- $body-color : $white !default ;
47-
4854// Links
4955
5056$link-color : $success !default ;
@@ -56,114 +62,110 @@ $font-family-sans-serif: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI
5662$h1-font-size : 3rem !default ;
5763$h2-font-size : 2.5rem !default ;
5864$h3-font-size : 2rem !default ;
59- $text-muted : $gray-600 !default ;
65+ $text-muted : body-mix ( 75 % ) !default ;
6066
6167// Tables
6268
63- $table-border-color : $gray-700 !default ;
69+ $table-border-color : body-mix ( 85 % ) !default ;
6470
6571$table-bg-scale : 0 !default ;
6672
6773// Forms
6874
6975$input-bg : $white !default ;
70- $input-color : $gray-800 !default ;
76+ $input-color : body-mix ( 95 % ) !default ;
7177$input-border-color : $body-bg !default ;
72- $input-group-addon-color : $gray-500 !default ;
73- $input-group-addon-bg : $gray-700 !default ;
78+ $input-group-addon-color : body-mix ( 65 % ) !default ;
79+ $input-group-addon-bg : body-mix ( 85 % ) !default ;
7480
75- $form-check-input-bg : $white !default ;
81+ $form-check-input-bg : $body-color !default ;
7682$form-check-input-border : none !default ;
7783
78- $form-file-button-color : $white !default ;
84+ $form-file-button-color : $body-color !default ;
7985
8086// Dropdowns
8187
82- $dropdown-bg : $gray-900 !default ;
83- $dropdown-border-color : $gray-700 !default ;
84- $dropdown-divider-bg : $gray-700 !default ;
85- $dropdown-link-color : $white !default ;
86- $dropdown-link-hover-color : $white !default ;
88+ $dropdown-bg : $body-bg !default ;
89+ $dropdown-border-color : body-mix ( 85 % ) !default ;
90+ $dropdown-divider-bg : body-mix ( 85 % ) !default ;
91+ $dropdown-link-color : $body-color !default ;
92+ $dropdown-link-hover-color : $body-color !default ;
8793$dropdown-link-hover-bg : $primary !default ;
8894
8995// Navs
9096
9197$nav-link-padding-x : 2rem !default ;
92- $nav-link-disabled-color : $gray-500 !default ;
93- $nav-tabs-border-color : $gray-700 !default ;
98+ $nav-link-disabled-color : body-mix ( 65 % ) !default ;
99+ $nav-tabs-border-color : body-mix ( 85 % ) !default ;
94100$nav-tabs-link-hover-border-color : $nav-tabs-border-color $nav-tabs-border-color transparent !default ;
95- $nav-tabs-link-active-color : $white !default ;
101+ $nav-tabs-link-active-color : $body-color !default ;
96102$nav-tabs-link-active-border-color : $nav-tabs-border-color $nav-tabs-border-color transparent !default ;
97103
98104// Navbar
99105
100106$navbar-padding-y : 1rem !default ;
101- $navbar-dark-color : rgba ($white , .6 ) !default ;
102- $navbar-dark-hover-color : $white !default ;
103- $navbar-light-color : rgba ($gray-900 , .7 ) !default ;
104- $navbar-light-hover-color : $gray-900 !default ;
105- $navbar-light-active-color : $gray-900 !default ;
106- $navbar-light-toggler-border-color : rgba ($gray-900 , .1 ) !default ;
107+ $navbar-light-bg : $primary !default ;
108+ $navbar-dark-bg : $success !default ;
107109
108110// Pagination
109111
110- $pagination-color : $white !default ;
112+ $pagination-color : $body-color !default ;
111113$pagination-bg : $success !default ;
112114$pagination-border-width : 0 !default ;
113115$pagination-border-color : transparent !default ;
114- $pagination-hover-color : $white !default ;
116+ $pagination-hover-color : $body-color !default ;
115117$pagination-hover-bg : lighten ($success , 10% ) !default ;
116118$pagination-hover-border-color : transparent !default ;
117119$pagination-active-bg : $pagination-hover-bg !default ;
118120$pagination-active-border-color : transparent !default ;
119- $pagination-disabled-color : $white !default ;
121+ $pagination-disabled-color : $body-color !default ;
120122$pagination-disabled-bg : darken ($success , 15% ) !default ;
121123$pagination-disabled-border-color : transparent !default ;
122124
123125// Cards
124126
125- $card-cap-bg : $gray-700 !default ;
126- $card-bg : $gray-800 !default ;
127+ $card-cap-bg : body-mix ( 85 % ) !default ;
128+ $card-bg : body-mix ( 95 % ) !default ;
127129
128130// Popovers
129131
130- $popover-bg : $gray-800 !default ;
131- $popover-header-bg : $gray-700 !default ;
132+ $popover-bg : body-mix ( 95 % ) !default ;
133+ $popover-header-bg : body-mix ( 85 % ) !default ;
132134
133135// Toasts
134136
135- $toast-background-color : $gray-700 !default ;
136- $toast-header-background-color : $gray-800 !default ;
137+ $toast-background-color : body-mix ( 85 % ) !default ;
138+ $toast-header-background-color : body-mix ( 95 % ) !default ;
137139
138140// Modals
139141
140- $modal-content-bg : $gray-800 !default ;
141- $modal-content-border-color : $gray-700 !default ;
142- $modal-header-border-color : $gray-700 !default ;
142+ $modal-content-bg : body-mix ( 95 % ) !default ;
143+ $modal-content-border-color : body-mix ( 85 % ) !default ;
144+ $modal-header-border-color : body-mix ( 85 % ) !default ;
143145
144146// Progress bars
145147
146- $progress-bg : $gray-700 !default ;
148+ $progress-bg : body-mix ( 85 % ) !default ;
147149
148150// List group
149151
150152$list-group-color : $body-color !default ;
151- $list-group-bg : $gray-800 !default ;
152- $list-group-border-color : $gray-700 !default ;
153- $list-group-hover-bg : $gray-700 !default ;
153+ $list-group-bg : body-mix ( 95 % ) !default ;
154+ $list-group-border-color : body-mix ( 85 % ) !default ;
155+ $list-group-hover-bg : body-mix ( 85 % ) !default ;
154156$list-group-action-hover-color : $list-group-color !default ;
155- $list-group-action-active-bg : $gray-900 !default ;
157+ $list-group-action-active-bg : body-mix ( 99 % ) !default ;
156158
157159// Breadcrumbs
158160
159161$breadcrumb-padding-y : .375rem !default ;
160162$breadcrumb-padding-x : .75rem !default ;
161- $breadcrumb-bg : $gray-700 !default ;
163+ $breadcrumb-bg : body-mix ( 85 % ) !default ;
162164$breadcrumb-border-radius : .25rem !default ;
163165
164166// Close
165167
166- $btn-close-color : $white !default ;
168+ $btn-close-color : $body-color !default ;
167169$btn-close-opacity : .4 !default ;
168170$btn-close-hover-opacity : 1 !default ;
169171
@@ -187,14 +189,14 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0
187189
188190.blockquote {
189191 & -footer {
190- color : $gray-600 ;
192+ color : body-mix ( 75 % ) ;
191193 }
192194}
193195
194196// Forms
195197
196198.input-group-addon {
197- color : $white ;
199+ color : $body-color ;
198200}
199201
200202.form-floating > label {
@@ -212,12 +214,12 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0
212214 .nav-item.open .nav-link ,
213215 .nav-item.open .nav-link :focus ,
214216 .nav-item.open .nav-link :hover {
215- color : $white ;
217+ color : $body-color ;
216218 }
217219}
218220
219221.breadcrumb a {
220- color : $white ;
222+ color : $body-color ;
221223}
222224
223225.pagination {
@@ -230,18 +232,18 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0
230232
231233.alert {
232234 border : none ;
233- color : $white ;
235+ color : $body-color ;
234236
235237 a ,
236238 .alert-link {
237- color : $white ;
239+ color : $body-color ;
238240 text-decoration : underline ;
239241 }
240242
241243 @each $color , $value in $theme-colors {
242244 & -#{$color} {
243245 @if $enable-gradients {
244- background : $value linear-gradient (180deg , mix ($white , $value , 15% ), $value ) repeat-x ;
246+ background : $value linear-gradient (180deg , mix ($body-color , $value , 15% ), $value ) repeat-x ;
245247 } @else {
246248 background-color : $value ;
247249 }
0 commit comments