_accent.scss 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. //
  2. // Mixins: Accent
  3. //
  4. // Accent Variant
  5. @mixin accent-variant($name, $color) {
  6. $link-color: $color;
  7. .accent-#{$name} {
  8. $link-hover-color: darken($color, 15%);
  9. $pagination-active-bg: $color;
  10. $pagination-active-border-color: $color;
  11. .btn-link,
  12. a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):not(.page-link):not(.badge):not(.btn),
  13. .nav-tabs .nav-link {
  14. color: $link-color;
  15. @include hover () {
  16. color: $link-hover-color;
  17. }
  18. }
  19. .dropdown-item {
  20. &:active,
  21. &.active {
  22. background-color: $color;
  23. color: color-yiq($color);
  24. }
  25. }
  26. .custom-control-input:checked ~ .custom-control-label {
  27. &::before {
  28. background-color: $color;
  29. border-color: darken($color, 20%);
  30. }
  31. &::after {
  32. $new-color: color-yiq($color);
  33. background-image: str-replace($custom-checkbox-indicator-icon-checked, str-replace(#{$custom-control-indicator-checked-color}, "#", "%23"), str-replace(#{$new-color}, "#", "%23"));
  34. }
  35. }
  36. .form-control:focus:not(.is-invalid):not(.is-warning):not(.is-valid),
  37. .custom-select:focus,
  38. .custom-control-input:focus:not(:checked) ~ .custom-control-label::before,
  39. .custom-file-input:focus ~ .custom-file-label {
  40. border-color: lighten($color, 25%);
  41. }
  42. .page-item {
  43. .page-link {
  44. color: $link-color;
  45. }
  46. &.active a,
  47. &.active .page-link {
  48. background-color: $pagination-active-bg;
  49. border-color: $pagination-active-border-color;
  50. color: $pagination-active-color;
  51. }
  52. &.disabled a,
  53. &.disabled .page-link {
  54. background-color: $pagination-disabled-bg;
  55. border-color: $pagination-disabled-border-color;
  56. color: $pagination-disabled-color;
  57. }
  58. }
  59. [class*="sidebar-dark-"] {
  60. .sidebar {
  61. a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link) {
  62. color: $sidebar-dark-color;
  63. @include hover () {
  64. color: $sidebar-dark-hover-color;
  65. }
  66. }
  67. }
  68. }
  69. [class*="sidebar-light-"] {
  70. .sidebar {
  71. a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link) {
  72. color: $sidebar-light-color;
  73. @include hover () {
  74. color: $sidebar-light-hover-color;
  75. }
  76. }
  77. }
  78. }
  79. }
  80. @include dark-mode () {
  81. &.accent-#{$name} {
  82. .page-item {
  83. .page-link {
  84. &:hover,
  85. &:focus {
  86. color: lighten($link-color, 5%);
  87. }
  88. }
  89. }
  90. }
  91. }
  92. }