Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_color.scss « mixins « src - github.com/picturepan2/spectre.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3ac9041456551f8c3af3e298bdf44ab5240692ba (plain)
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;

    @if (lightness($color) < 60) {
      color: $light-color;
    }
  }
}

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

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