Debian Codegraph @

inst/lib/bsw5/dist/morph/_bootswatch.scss

raw
1 // Morph 5.3.1
2 // Bootswatch
3
4
5 // Variables
6
7 $web-font-path: "https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap" !default;
8 @if $web-font-path {
9 @import url($web-font-path);
10 }
11
12 $btn-box-shadow-inset: inset 2px 3px 6px rgba($black, .2), inset -3px -2px 6px rgba($white, .2) !default;
13
14 // Mixins
15
16 @mixin shadow($shadow: $box-shadow) {
17 background-color: $gray-200;
18 border: none;
19 box-shadow: $shadow;
20 transition: background-color .15s ease-in-out, border .15s ease-in-out, box-shadow .15s ease-in-out, color .15s ease-in-out;
21 }
22
23 @mixin shadow-outline($shadow: $box-shadow) {
24 position: absolute;
25 top: -.5rem;
26 right: -.5rem;
27 bottom: -.5rem;
28 left: -.5rem;
29 z-index: -1;
30 content: "";
31 background-color: $body-bg;
32 border: 1px solid rgba($white, .1);
33 box-shadow: $shadow;
34 transition: background-color .15s ease-in-out, border .15s ease-in-out, box-shadow .15s ease-in-out, color .15s ease-in-out;
35 }
36
37 // Buttons
38
39 .btn {
40 position: relative;
41 color: $gray-700;
42 border-radius: $btn-border-radius;
43 @include shadow();
44
45 &:focus {
46 color: $gray-700;
47 }
48
49 &:hover,
50 &:focus,
51 &:active,
52 &:active:focus {
53 @include shadow();
54 color: $gray-700;
55 }
56
57 &:active,
58 &:active:focus {
59 border-color: transparent;
60 box-shadow: $btn-box-shadow-inset;
61 }
62
63 @each $color, $value in $theme-colors {
64 &-#{$color} {
65
66 &:active,
67 &:active:focus {
68 @if ($color == secondary or $color == light) {
69 color: $gray-700;
70 background-color: $gray-200;
71 } @else {
72 color: $white;
73 background-color: $value;
74 }
75 }
76 }
77 }
78
79 &-link {
80 font-weight: $btn-font-weight;
81
82 &:hover,
83 &:active,
84 &:active:focus {
85 color: $dark;
86 }
87 }
88
89 &.disabled {
90 color: $gray-700;
91 background-color: $gray-200;
92 box-shadow: 2px 2px 5px rgba($black, .1), -2px -2px 5px rgba($white, .5);
93 }
94 }
95
96 .btn-outline {
97 @each $color, $value in $theme-colors {
98 &-#{$color} {
99 background-color: $value;
100 border: none;
101 box-shadow: 5px 5px 10px rgba($black, .2), -5px -5px 10px rgba($white, .1);
102
103 @if ($color == secondary or $color == light) {
104 color: $gray-700;
105 } @else {
106 color: $white;
107 }
108
109 &:hover,
110 &:focus {
111 background-color: $value;
112 border: none;
113 box-shadow: 5px 5px 10px rgba($black, .2), -5px -5px 10px rgba($white, .1);
114
115 @if ($color == secondary or $color == light) {
116 color: $gray-700;
117 } @else {
118 color: $white;
119 }
120 }
121
122 &:active,
123 &:active:focus {
124 background-color: $value;
125 border: none;
126 box-shadow: inset 2px 3px 6px rgba($black, .1), inset -3px -2px 6px rgba($white, .1);
127
128 @if ($color == secondary or $color == light) {
129 color: $gray-700;
130 } @else {
131 color: $white;
132 }
133 }
134 }
135 }
136 }
137
138 .btn-group,
139 .btn-group-vertical {
140 @include shadow();
141 border: none;
142 border-radius: $btn-border-radius;
143
144 .btn,
145 .btn-group {
146 margin: 0;
147 border: none;
148 box-shadow: none;
149
150 &:hover,
151 &:active,
152 &:focus,
153 &:active:focus {
154 border: none;
155 }
156 }
157 }
158
159 .btn-group {
160
161 > .btn:nth-child(n + 3),
162 > :not(.btn-check) + .btn,
163 > .btn-group:not(:first-child) > .btn {
164 border-left: 1px solid $border-color;
165 border-top-left-radius: 0;
166 border-bottom-left-radius: 0;
167
168 &:hover,
169 &:active,
170 &:active:focus {
171 border-left: 1px solid $border-color;
172 }
173 }
174
175 > .btn:not(:last-child):not(.dropdown-toggle),
176 > .btn-group:not(:last-child) > .btn {
177 border-top-right-radius: 0;
178 border-bottom-right-radius: 0;
179 }
180 }
181
182 .btn-group-vertical {
183 border-radius: 1rem;
184
185 .btn {
186 border-radius: 1rem;
187
188 &:hover,
189 &:active,
190 &:focus,
191 &:active:focus {
192 border-radius: 1rem;
193 }
194 }
195
196 > .btn:nth-child(n + 3),
197 > :not(.btn-check) + .btn,
198 > .btn-group:not(:first-child) > .btn {
199 border-top: 1px solid rgba($black, .05);
200 border-top-left-radius: 0;
201 border-top-right-radius: 0;
202
203 &:hover,
204 &:active,
205 &:active:focus {
206 border-top: 1px solid rgba($black, .05);
207 border-top-left-radius: 0;
208 border-top-right-radius: 0;
209 }
210 }
211
212 > .btn:not(:last-child):not(.dropdown-toggle),
213 > .btn-group:not(:last-child) > .btn {
214 border-bottom-right-radius: 0;
215 border-bottom-left-radius: 0;
216
217 &:hover,
218 &:active,
219 &:active:focus {
220 border-bottom-right-radius: 0;
221 border-bottom-left-radius: 0;
222 }
223 }
224 }
225
226 .btn-check:checked + .btn,
227 .btn-check:active + .btn {
228 box-shadow: inset 2px 3px 6px rgba($black, .2);
229
230 @each $color, $value in $theme-colors {
231 &-#{$color} {
232 background-color: $value;
233
234 .btn-check:checked + &,
235 .btn-check:active + & {
236 @if $color == secondary {
237 color: $gray-700;
238 } @else {
239 color: $value;
240 }
241 }
242 }
243 }
244 }
245
246 .btn-check:not(:checked) + .btn,
247 .btn-check:not(:checked) + .btn:active {
248 color: $gray-700;
249 background-color: $gray-200;
250 }
251
252 .btn-check:checked ~ .btn-check:active + .btn,
253 .btn-check:checked ~ .btn-check:checked + .btn {
254 box-shadow: inset 0 3px 6px rgba($black, .2);
255 }
256
257 // Navs
258
259 .dropdown-menu {
260 backdrop-filter: blur(3px);
261 -webkit-backdrop-filter: blur(3px);
262 -moz-backdrop-filter: blur(3px);
263 -ms-backdrop-filter: blur(3px);
264 -o-backdrop-filter: blur(3px);
265 }
266
267 .nav-tabs {
268 @include shadow();
269 border-radius: $border-radius;
270
271 .nav-item {
272 box-shadow: 1px 0 $border-color;
273
274 &:first-child .nav-link {
275 border-top-left-radius: $border-radius;
276 border-bottom-left-radius: $border-radius;
277 }
278
279 &:last-child .nav-link {
280 border-top-right-radius: $border-radius;
281 border-bottom-right-radius: $border-radius;
282 }
283 }
284
285 .nav-link.active,
286 .nav-item.show .nav-link {
287 box-shadow: inset 0 3px 6px rgba($black, .2);
288 }
289 }
290
291 .nav-pills {
292 @include shadow();
293 padding: 1rem;
294 border-radius: $border-radius;
295
296
297 .nav-link.active {
298 box-shadow: inset 0 3px 6px rgba($black, .2);
299 }
300 }
301
302 .breadcrumb {
303 @include shadow();
304 border-radius: $border-radius;
305 }
306
307 .pagination {
308 @include shadow();
309 justify-content: center;
310 -webkit-justify-content: center;
311 border-radius: $border-radius;
312 }
313
314 // Forms
315
316 .input-group {
317 background-color: $gray-100;
318 border-radius: $border-radius;
319 box-shadow: $box-shadow-inset;
320
321 > .form-control {
322 background: none;
323 box-shadow: none;
324 }
325
326 .input-group-text {
327 background: none;
328 }
329
330 .btn {
331 border: none;
332 border-radius: 0;
333
334 &:first-child {
335 border-radius: $border-radius 0 0 $border-radius;
336 }
337
338 &:last-child {
339 border-radius: 0 $border-radius $border-radius 0;
340 }
341 }
342 }
343
344 .form-range {
345 &::-webkit-slider-runnable-track {
346 box-shadow: inset 1px 1px 4px rgba($black, .15);
347 }
348
349 &::-webkit-slider-thumb,
350 &:focus::-webkit-slider-thumb {
351 box-shadow: 1px 1px 3px rgba($black, .2), inset 2px 2px 8px rgba(shade-color($form-range-thumb-bg, 50%), .1);
352 }
353 }
354
355 .form-check-input {
356 background-color: $gray-400;
357 border: none;
358 box-shadow: inset 1px 1px 7px rgba($black, .2);
359
360 &:focus {
361 border: none;
362 box-shadow: none;
363 }
364
365 &:active {
366 filter: none;
367 }
368
369 &:checked {
370 background-color: $primary;
371 box-shadow: inset 1px 1px 7px rgba($black, .2);
372 }
373 }
374
375 .form-control {
376 &::file-selector-button {
377 box-shadow: 2px 2px 5px rgba($black, .2), inset 3px 3px 10px rgba(shade-color($form-range-thumb-bg, 50%), .1);
378 }
379 }
380
381 .form-select:not([multiple]) {
382 position: relative;
383 box-shadow: $box-shadow;
384 }
385
386 // Indicators
387
388 .alert {
389 backdrop-filter: blur(3px);
390 -webkit-backdrop-filter: blur(3px);
391 -moz-backdrop-filter: blur(3px);
392 -ms-backdrop-filter: blur(3px);
393 -o-backdrop-filter: blur(3px);
394 box-shadow: $dropdown-box-shadow;
395
396 @each $color, $value in $theme-colors {
397 &-#{$color} {
398 background-color: rgba($value, .75);
399 box-shadow: $box-shadow-lg, inset 1px 1px 3px rgba(tint-color($value, 80%), .4), inset -5px -5px 20px rgba(shade-color($value, 80%), .05);
400 }
401 }
402 }
403
404 .badge {
405 &.bg-secondary,
406 &.bg-light {
407 color: $gray-700;
408 }
409 }
410
411 .tooltip {
412 &.show {
413 opacity: 1;
414 }
415
416 &-inner,
417 .arrow {
418 backdrop-filter: blur(3px);
419 -webkit-backdrop-filter: blur(3px);
420 -moz-backdrop-filter: blur(3px);
421 -ms-backdrop-filter: blur(3px);
422 -o-backdrop-filter: blur(3px);
423 box-shadow: $dropdown-box-shadow;
424 }
425 }
426
427 .popover,
428 .toast,
429 .modal-content {
430 backdrop-filter: blur(3px);
431 -webkit-backdrop-filter: blur(3px);
432 -moz-backdrop-filter: blur(3px);
433 -ms-backdrop-filter: blur(3px);
434 -o-backdrop-filter: blur(3px);
435 box-shadow: $dropdown-box-shadow;
436 }
437
438 .progress {
439 box-shadow: inset 2px 4px 6px rgba(shade-color($body-bg, 50%), .2), inset -3px -2px 5px rgba($white, .8);
440 }
441
442 .progress-bar {
443 box-shadow: 2px 2px 5px rgba($black, .2);
444
445 &:first-child {
446 border-top-left-radius: $border-radius-pill;
447 border-bottom-left-radius: $border-radius-pill;
448 }
449
450 &:last-child {
451 border-top-right-radius: $border-radius-pill;
452 border-bottom-right-radius: $border-radius-pill;
453 }
454 }
455
456 // Containers
457
458 .card {
459 box-shadow: inset 2px 2px 6px rgba(shade-color($body-bg, 50%), .2), inset -3px -2px 4px rgba($white, .2);
460
461 @each $color, $value in $theme-colors {
462 &-#{$color} {
463 box-shadow: inset 2px 2px 6px rgba(shade-color($value, 80%), .05), inset -3px -2px 4px rgba(tint-color($value, 80%), .2);
464 }
465 }
466
467 &-header {
468 border-bottom: 1px solid $border-color;
469 }
470
471 h1,
472 h2,
473 h3,
474 h4,
475 h5,
476 h6 {
477 color: inherit;
478 }
479 }
480
481 .list-group {
482 background-color: $card-bg;
483 box-shadow: inset 2px 2px 6px rgba(shade-color($body-bg, 50%), .2), inset -3px -2px 4px rgba($white, .2);
484 }
485
486 .list-group-item {
487 background-color: transparent;
488 }