| 1 |
// Materia 5.3.1 |
| 2 |
// Bootswatch |
| 3 |
|
| 4 |
|
| 5 |
// Variables |
| 6 |
|
| 7 |
$web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" !default; |
| 8 |
@if $web-font-path { |
| 9 |
@import url($web-font-path); |
| 10 |
} |
| 11 |
|
| 12 |
// Mixins |
| 13 |
|
| 14 |
@mixin ripple($color) { |
| 15 |
position: relative; |
| 16 |
|
| 17 |
&::before { |
| 18 |
position: absolute; |
| 19 |
top: 0; |
| 20 |
left: 0; |
| 21 |
display: block; |
| 22 |
width: 100%; |
| 23 |
height: 100%; |
| 24 |
margin-left: 0; |
| 25 |
pointer-events: none; |
| 26 |
content: ""; |
| 27 |
background-position: 50%; |
| 28 |
background-size: 1000% 1000%; |
| 29 |
border: none; |
| 30 |
opacity: 0; |
| 31 |
transition: background .5s, opacity 1s; |
| 32 |
@include gradient-radial($color 10%, transparent 10.01%); |
| 33 |
} |
| 34 |
|
| 35 |
&:active::before { |
| 36 |
background-size: 0 0; |
| 37 |
opacity: .2; |
| 38 |
transition: none; |
| 39 |
} |
| 40 |
|
| 41 |
&.disabled, |
| 42 |
&[disabled] { |
| 43 |
&::before { |
| 44 |
display: none; |
| 45 |
} |
| 46 |
} |
| 47 |
} |
| 48 |
|
| 49 |
@mixin btn($class,$bg,$color) { |
| 50 |
.btn-#{$class} { |
| 51 |
&:focus { |
| 52 |
background-color: $bg; |
| 53 |
box-shadow: $btn-focus-box-shadow; |
| 54 |
} |
| 55 |
|
| 56 |
&:hover, |
| 57 |
&:active:hover { |
| 58 |
background-color: shade-color($bg, 12%); |
| 59 |
} |
| 60 |
|
| 61 |
&:active { |
| 62 |
box-shadow: $btn-active-box-shadow; |
| 63 |
} |
| 64 |
|
| 65 |
@include ripple($color); |
| 66 |
} |
| 67 |
|
| 68 |
.btn-outline-#{$class} { |
| 69 |
@include ripple($color); |
| 70 |
} |
| 71 |
} |
| 72 |
|
| 73 |
.dropdown-toggle::after, |
| 74 |
.dropup .dropdown-toggle::after, |
| 75 |
.dropstart .dropdown-toggle::after, |
| 76 |
.dropend .dropdown-toggle::after { |
| 77 |
border-width: 4px; |
| 78 |
} |
| 79 |
|
| 80 |
// Navbar |
| 81 |
|
| 82 |
.navbar { |
| 83 |
border: none; |
| 84 |
box-shadow: 0 1px 2px rgba($black, .3); |
| 85 |
|
| 86 |
&-brand { |
| 87 |
font-size: 24px; |
| 88 |
} |
| 89 |
|
| 90 |
&-nav .nav-link { |
| 91 |
padding-top: .9rem; |
| 92 |
padding-bottom: .9rem; |
| 93 |
} |
| 94 |
|
| 95 |
&.bg-dark, |
| 96 |
&.bg-primary { |
| 97 |
input[type="search"], |
| 98 |
input[type="text"], |
| 99 |
input[type="password"], |
| 100 |
input[type="email"], |
| 101 |
input[type="number"], |
| 102 |
input[type="tel"] { |
| 103 |
color: $white; |
| 104 |
box-shadow: inset 0 -1px 0 rgba($white, .5); |
| 105 |
|
| 106 |
&:focus { |
| 107 |
box-shadow: inset 0 -2px 0 $white; |
| 108 |
} |
| 109 |
|
| 110 |
&::placeholder { |
| 111 |
color: rgba($white, .5); |
| 112 |
} |
| 113 |
} |
| 114 |
} |
| 115 |
} |
| 116 |
|
| 117 |
// Buttons |
| 118 |
|
| 119 |
@include btn(primary, $primary, $white); |
| 120 |
@include btn(secondary, $secondary, $gray-500); |
| 121 |
@include btn(success, $success, $white); |
| 122 |
@include btn(info, $info, $white); |
| 123 |
@include btn(warning, $warning, $white); |
| 124 |
@include btn(danger, $danger, $white); |
| 125 |
@include btn(dark, $dark, $white); |
| 126 |
@include btn(light, $light, $white); |
| 127 |
|
| 128 |
.btn { |
| 129 |
text-transform: uppercase; |
| 130 |
border: none; |
| 131 |
box-shadow: $btn-box-shadow; |
| 132 |
transition: color .4s, background-color .4s, border-color .4s, box-shadow .4s; |
| 133 |
|
| 134 |
&-link { |
| 135 |
color: $link-color; |
| 136 |
box-shadow: none; |
| 137 |
|
| 138 |
&:hover, |
| 139 |
&:focus { |
| 140 |
color: $link-hover-color; |
| 141 |
text-decoration: $link-hover-decoration; |
| 142 |
-webkit-text-decoration: $link-hover-decoration; |
| 143 |
-moz-text-decoration: $link-hover-decoration; |
| 144 |
-ms-text-decoration: $link-hover-decoration; |
| 145 |
-o-text-decoration: $link-hover-decoration; |
| 146 |
box-shadow: none; |
| 147 |
} |
| 148 |
|
| 149 |
&.disabled, // Although btn-link is intended for buttons, which want to look like link, I include here a.disable for the sake of consistency |
| 150 |
&[disabled], |
| 151 |
fieldset[disabled] & { |
| 152 |
&:hover, |
| 153 |
&:active:hover { |
| 154 |
color: $btn-link-disabled-color; |
| 155 |
text-decoration: none; |
| 156 |
} |
| 157 |
} |
| 158 |
} |
| 159 |
|
| 160 |
&-secondary { |
| 161 |
&.disabled, |
| 162 |
&[disabled], |
| 163 |
fieldset[disabled] & { |
| 164 |
color: rgba($black, .4); |
| 165 |
background-color: rgba($black, .1); |
| 166 |
opacity: 1; |
| 167 |
|
| 168 |
&:hover, |
| 169 |
&:focus { |
| 170 |
background-color: rgba($black, .1); |
| 171 |
} |
| 172 |
} |
| 173 |
} |
| 174 |
|
| 175 |
&-outline-secondary { |
| 176 |
color: $gray-300; |
| 177 |
border-color: $gray-200; |
| 178 |
} |
| 179 |
|
| 180 |
&-warning { |
| 181 |
color: $white; |
| 182 |
} |
| 183 |
} |
| 184 |
|
| 185 |
.btn-group { |
| 186 |
.btn + .btn, |
| 187 |
.btn + .btn-group, |
| 188 |
.btn-group + .btn, |
| 189 |
.btn-group + .btn-group { |
| 190 |
margin-left: 0; |
| 191 |
} |
| 192 |
|
| 193 |
&-vertical { |
| 194 |
> .btn + .btn, |
| 195 |
> .btn + .btn-group, |
| 196 |
> .btn-group + .btn, |
| 197 |
> .btn-group + .btn-group { |
| 198 |
margin-top: 0; |
| 199 |
} |
| 200 |
} |
| 201 |
|
| 202 |
.btn + .btn, |
| 203 |
.btn + .btn-group > .dropdown-toggle { |
| 204 |
box-shadow: 1px 1px 4px rgba($black, .4); |
| 205 |
} |
| 206 |
} |
| 207 |
|
| 208 |
.border-secondary { |
| 209 |
border: 1px solid mix($white, $black, 86.7%) !important; |
| 210 |
} |
| 211 |
|
| 212 |
// Typography |
| 213 |
|
| 214 |
body, |
| 215 |
input, |
| 216 |
button { |
| 217 |
letter-spacing: .1px; |
| 218 |
} |
| 219 |
|
| 220 |
p { |
| 221 |
margin: 0 0 1em; |
| 222 |
} |
| 223 |
|
| 224 |
.text-secondary { |
| 225 |
color: $gray-500 !important; |
| 226 |
} |
| 227 |
|
| 228 |
// Tables |
| 229 |
|
| 230 |
.table-hover { |
| 231 |
> tbody > tr, |
| 232 |
> tbody > tr > th, |
| 233 |
> tbody > tr > td { |
| 234 |
transition: background-color .2s, color .2s; |
| 235 |
} |
| 236 |
} |
| 237 |
|
| 238 |
.thead-inverse th { |
| 239 |
color: $white; |
| 240 |
background-color: $primary; |
| 241 |
} |
| 242 |
|
| 243 |
// Forms |
| 244 |
|
| 245 |
.col-form-label { |
| 246 |
font-size: 16px; |
| 247 |
|
| 248 |
&-sm { |
| 249 |
font-size: $font-size-sm; |
| 250 |
} |
| 251 |
|
| 252 |
&-lg { |
| 253 |
font-size: $font-size-lg; |
| 254 |
} |
| 255 |
} |
| 256 |
|
| 257 |
textarea, |
| 258 |
textarea.form-control, |
| 259 |
input.form-control, |
| 260 |
input[type="text"], |
| 261 |
input[type="password"], |
| 262 |
input[type="email"], |
| 263 |
input[type="number"], |
| 264 |
[type="text"].form-control, |
| 265 |
[type="password"].form-control, |
| 266 |
[type="email"].form-control, |
| 267 |
[type="tel"].form-control, |
| 268 |
[contenteditable].form-control { |
| 269 |
box-shadow: $input-box-shadow; |
| 270 |
transition: box-shadow .2s; |
| 271 |
|
| 272 |
&:focus { |
| 273 |
box-shadow: $input-focus-box-shadow; |
| 274 |
} |
| 275 |
|
| 276 |
&[disabled], |
| 277 |
&[readonly] { |
| 278 |
border-bottom: 1px dotted mix($white, $black, 86.7%); |
| 279 |
box-shadow: none; |
| 280 |
} |
| 281 |
|
| 282 |
&[disabled], |
| 283 |
&[disabled]::placeholder { |
| 284 |
color: mix($white, $black, 86.7%); |
| 285 |
} |
| 286 |
} |
| 287 |
|
| 288 |
select, |
| 289 |
select.form-control { |
| 290 |
padding: .5rem 0; |
| 291 |
appearance: none; |
| 292 |
-webkit-appearance: none; |
| 293 |
-moz-appearance: none; |
| 294 |
-ms-appearance: none; |
| 295 |
-o-appearance: none; |
| 296 |
background-image: escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 4'><path fill='#{$gray-600}' d='M8 0 4 4 0 0z'/></svg>")); |
| 297 |
background-repeat: no-repeat; |
| 298 |
background-position: right center; |
| 299 |
background-size: 8px 4px; |
| 300 |
box-shadow: $input-box-shadow; |
| 301 |
|
| 302 |
&.input { |
| 303 |
&-sm { |
| 304 |
font-size: $font-size-sm; |
| 305 |
} |
| 306 |
|
| 307 |
&-lg { |
| 308 |
font-size: $font-size-lg; |
| 309 |
} |
| 310 |
} |
| 311 |
|
| 312 |
&:focus { |
| 313 |
background-image: escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 4'><path fill='#{$gray-900}' d='M8 0 4 4 0 0z'/></svg>")); |
| 314 |
box-shadow: $input-focus-box-shadow; |
| 315 |
} |
| 316 |
|
| 317 |
&[multiple] { |
| 318 |
background: none; |
| 319 |
} |
| 320 |
} |
| 321 |
|
| 322 |
.form-check-input { |
| 323 |
width: 1.25em; |
| 324 |
height: 1.25em; |
| 325 |
margin-top: 1px; |
| 326 |
border: 2px solid $gray-400; |
| 327 |
|
| 328 |
&:checked[type="radio"] { |
| 329 |
background-image: escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='2' fill='#{$blue}' stroke='#{$white}'/></svg>")), var(--bs-gradient); |
| 330 |
background-size: 1.8em; |
| 331 |
} |
| 332 |
} |
| 333 |
|
| 334 |
.form-switch { |
| 335 |
.form-check-input { |
| 336 |
position: relative; |
| 337 |
height: .8em; |
| 338 |
margin-top: .29em; |
| 339 |
background-color: $gray-400; |
| 340 |
background-image: none; |
| 341 |
border: none; |
| 342 |
|
| 343 |
&:focus { |
| 344 |
box-shadow: none; |
| 345 |
} |
| 346 |
|
| 347 |
&::before { |
| 348 |
position: absolute; |
| 349 |
top: -.2em; |
| 350 |
left: -.2em; |
| 351 |
width: 1.2em; |
| 352 |
height: 1.2em; |
| 353 |
content: ""; |
| 354 |
background-color: $white; |
| 355 |
border-radius: 50%; |
| 356 |
box-shadow: 0 1px 4px rgba($black, .3); |
| 357 |
transition: left .15s ease-in-out; |
| 358 |
} |
| 359 |
|
| 360 |
&::after { |
| 361 |
position: absolute; |
| 362 |
top: -.2em; |
| 363 |
left: -.2em; |
| 364 |
z-index: -1; |
| 365 |
width: 1.2em; |
| 366 |
height: 1.2em; |
| 367 |
content: ""; |
| 368 |
border-radius: 50%; |
| 369 |
box-shadow: 0 0 0 9px rgba($black, .05); |
| 370 |
transition: left .15s ease-in-out, transform .15s ease-in-out, box-shadow .15s ease-in-out; |
| 371 |
transform: scale(0); |
| 372 |
} |
| 373 |
|
| 374 |
&:hover:not(.disabled), |
| 375 |
&:focus:not(.disabled) { |
| 376 |
|
| 377 |
&::after { |
| 378 |
transform: scale(.9); |
| 379 |
} |
| 380 |
} |
| 381 |
|
| 382 |
&:focus:not(.disabled) { |
| 383 |
&::after { |
| 384 |
box-shadow: 0 0 0 9px rgba($black, .1); |
| 385 |
} |
| 386 |
} |
| 387 |
|
| 388 |
&:checked { |
| 389 |
background-color: rgba($primary, .3); |
| 390 |
|
| 391 |
&::before { |
| 392 |
left: calc(100% - .8em); |
| 393 |
background-color: rgba($primary, 1); |
| 394 |
} |
| 395 |
|
| 396 |
&::after { |
| 397 |
left: calc(100% - .8em); |
| 398 |
box-shadow: 0 0 0 9px rgba($primary, .1); |
| 399 |
} |
| 400 |
|
| 401 |
&:hover:not(.disabled), |
| 402 |
&:focus:not(.disabled) { |
| 403 |
&::after { |
| 404 |
transform: scale(.9); |
| 405 |
} |
| 406 |
} |
| 407 |
|
| 408 |
&:focus:not(.disabled) { |
| 409 |
&::after { |
| 410 |
box-shadow: 0 0 0 9px rgba($primary, .2); |
| 411 |
} |
| 412 |
} |
| 413 |
} |
| 414 |
} |
| 415 |
} |
| 416 |
|
| 417 |
.form-check:not(.form-switch) { |
| 418 |
.form-check-input { |
| 419 |
&:checked[type="checkbox"] { |
| 420 |
background-image: escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='#{$white}' stroke-width='2' d='m6 10 3 3 6-6'/></svg>")), var(--bs-gradient); |
| 421 |
background-size: 1.6em; |
| 422 |
} |
| 423 |
} |
| 424 |
} |
| 425 |
|
| 426 |
.has-warning { |
| 427 |
input:not([type="checkbox"]), |
| 428 |
.form-control, |
| 429 |
input.form-control[readonly], |
| 430 |
input[type="text"][readonly], |
| 431 |
[type="text"].form-control[readonly], |
| 432 |
input:not([type="checkbox"]):focus, |
| 433 |
.form-control:focus { |
| 434 |
border-bottom: none; |
| 435 |
box-shadow: inset 0 -2px 0 $warning; |
| 436 |
} |
| 437 |
} |
| 438 |
|
| 439 |
.has-danger { |
| 440 |
input:not([type="checkbox"]), |
| 441 |
.form-control, |
| 442 |
input.form-control[readonly], |
| 443 |
input[type="text"][readonly], |
| 444 |
[type="text"].form-control[readonly], |
| 445 |
input:not([type="checkbox"]):focus, |
| 446 |
.form-control:focus { |
| 447 |
border-bottom: none; |
| 448 |
box-shadow: inset 0 -2px 0 $danger; |
| 449 |
} |
| 450 |
} |
| 451 |
|
| 452 |
.has-success { |
| 453 |
input:not([type="checkbox"]), |
| 454 |
.form-control, |
| 455 |
input.form-control[readonly], |
| 456 |
input[type="text"][readonly], |
| 457 |
[type="text"].form-control[readonly], |
| 458 |
input:not([type="checkbox"]):focus, |
| 459 |
.form-control:focus { |
| 460 |
border-bottom: none; |
| 461 |
box-shadow: inset 0 -2px 0 $success; |
| 462 |
} |
| 463 |
} |
| 464 |
|
| 465 |
// Remove the Bootstrap feedback styles for input addons |
| 466 |
.input-group-addon { |
| 467 |
.has-warning &, |
| 468 |
.has-danger &, |
| 469 |
.has-success & { |
| 470 |
color: $input-color; |
| 471 |
background-color: $input-group-addon-bg; |
| 472 |
border-color: $input-group-addon-border-color; |
| 473 |
} |
| 474 |
} |
| 475 |
|
| 476 |
.form-group-lg { |
| 477 |
select, |
| 478 |
select.form-control { |
| 479 |
line-height: 1.5; |
| 480 |
} |
| 481 |
} |
| 482 |
|
| 483 |
// Navs |
| 484 |
|
| 485 |
.nav-tabs { |
| 486 |
.nav-item + .nav-item { |
| 487 |
margin-left: 0; |
| 488 |
} |
| 489 |
|
| 490 |
.nav-link, |
| 491 |
.nav-link:focus { |
| 492 |
margin-right: 0; |
| 493 |
color: $body-color; |
| 494 |
background-color: transparent; |
| 495 |
border: none; |
| 496 |
box-shadow: inset 0 -1px 0 #ddd; |
| 497 |
transition: color .2s, box-shadow .2s; |
| 498 |
|
| 499 |
&:hover { |
| 500 |
color: $primary; |
| 501 |
background-color: transparent; |
| 502 |
box-shadow: inset 0 -2px 0 $primary; |
| 503 |
} |
| 504 |
} |
| 505 |
|
| 506 |
.nav-link.active, |
| 507 |
.nav-link.active:focus { |
| 508 |
color: $primary; |
| 509 |
border: none; |
| 510 |
box-shadow: inset 0 -2px 0 $primary; |
| 511 |
|
| 512 |
&:hover { |
| 513 |
color: $primary; |
| 514 |
border: none; |
| 515 |
} |
| 516 |
} |
| 517 |
|
| 518 |
.nav-link.disabled { |
| 519 |
box-shadow: inset 0 -1px 0 #ddd; |
| 520 |
} |
| 521 |
|
| 522 |
&.nav-justified { |
| 523 |
.nav-link, |
| 524 |
.nav-link:hover, |
| 525 |
.nav-link:focus, |
| 526 |
.nav-link.active, |
| 527 |
.nav-link.active:hover, |
| 528 |
.nav-link.active:focus { |
| 529 |
border: none; |
| 530 |
} |
| 531 |
} |
| 532 |
|
| 533 |
.dropdown-menu { |
| 534 |
margin-top: 0; |
| 535 |
} |
| 536 |
} |
| 537 |
|
| 538 |
.dropdown-menu { |
| 539 |
margin-top: 0; |
| 540 |
border: none; |
| 541 |
box-shadow: 0 1px 4px rgba(0, 0, 0, .3); |
| 542 |
} |
| 543 |
|
| 544 |
// Indicators |
| 545 |
|
| 546 |
.alert { |
| 547 |
padding-right: 2.5rem; |
| 548 |
border: none; |
| 549 |
|
| 550 |
&, |
| 551 |
h1, |
| 552 |
h2, |
| 553 |
h3, |
| 554 |
h4, |
| 555 |
h5, |
| 556 |
h6 { |
| 557 |
color: $white; |
| 558 |
} |
| 559 |
|
| 560 |
@each $color, $value in $theme-colors { |
| 561 |
&-#{$color} { |
| 562 |
@if $enable-gradients { |
| 563 |
background: $value linear-gradient(180deg, mix($body-bg, $value, 15%), $value) repeat-x; |
| 564 |
} @else { |
| 565 |
background-color: $value; |
| 566 |
} |
| 567 |
} |
| 568 |
} |
| 569 |
|
| 570 |
a:not(.btn), |
| 571 |
.alert-link { |
| 572 |
font-weight: 700; |
| 573 |
color: $white; |
| 574 |
} |
| 575 |
|
| 576 |
&-secondary, |
| 577 |
&-light { |
| 578 |
&, |
| 579 |
a:not(.btn), |
| 580 |
.alert-link { |
| 581 |
color: $body-color; |
| 582 |
} |
| 583 |
} |
| 584 |
} |
| 585 |
|
| 586 |
.badge { |
| 587 |
&.bg-secondary, |
| 588 |
&.bg-light { |
| 589 |
color: $dark; |
| 590 |
} |
| 591 |
} |
| 592 |
|
| 593 |
// Containers |
| 594 |
|
| 595 |
.card { |
| 596 |
box-shadow: 0 1px 4px rgba(0, 0, 0, .4); |
| 597 |
|
| 598 |
&.border-primary, |
| 599 |
&.border-secondary, |
| 600 |
&.border-success, |
| 601 |
&.border-info, |
| 602 |
&.border-warning, |
| 603 |
&.border-danger, |
| 604 |
&.border-light, |
| 605 |
&.border-dark { |
| 606 |
border-width: 1px; |
| 607 |
} |
| 608 |
} |
| 609 |
|
| 610 |
.list-group { |
| 611 |
&-item-action.active { |
| 612 |
h1, |
| 613 |
h2, |
| 614 |
h3, |
| 615 |
h4, |
| 616 |
h5, |
| 617 |
h6 { |
| 618 |
color: $white; |
| 619 |
} |
| 620 |
} |
| 621 |
} |
| 622 |
|
| 623 |
.modal-content { |
| 624 |
border-radius: .2rem; |
| 625 |
box-shadow: 0 6px 36px rgba(0, 0, 0, .3); |
| 626 |
} |
| 627 |
|
| 628 |
.modal, |
| 629 |
.toast, |
| 630 |
.offcanvas { |
| 631 |
.btn-close { |
| 632 |
background-image: escape-svg(url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$black}'><path d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/></svg>")); |
| 633 |
} |
| 634 |
} |
| 635 |
|
| 636 |
.popover { |
| 637 |
border: none; |
| 638 |
box-shadow: 0 1px 4px rgba(0, 0, 0, .3); |
| 639 |
} |
| 640 |
|
| 641 |
.carousel { |
| 642 |
&-caption { |
| 643 |
h1, |
| 644 |
h2, |
| 645 |
h3, |
| 646 |
h4, |
| 647 |
h5, |
| 648 |
h6 { |
| 649 |
color: inherit; |
| 650 |
} |
| 651 |
} |
| 652 |
} |