Summary Files Commits Branches @commit @diff @stats
path: root / src / mixins / _color.scss
blob: 659b331890573b07a7df7f2f8fe62fae44360455 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Background color utility mixin
@mixin bg-color-variant($name: ".bg-primary", $color: $primary-color) {
  #{$name} {
    background: $color !important;

    @if (lightness($color) < 5) {
      color: darken($light-color, 80%);
    }
  }
}

// Text color utility mixin
@mixin text-color-variant($name: ".text-primary", $color: $primary-color) {
  #{$name} {
    color: $color !important;
  }

  a#{$name} {
    &:focus,
    &:hover {
      color: darken($color, 5%);
    }
    &:visited {
      color: lighten($color, 5%);
    }
  }
}