summaryrefslogtreecommitdiff
path: root/data/theme/gnome-shell-sass/widgets/_check-box.scss
blob: f18d6418cf23da3adf766cd24269bcd5628b1439 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* Check Boxes */

.check-box {
  StBoxLayout { spacing: .8em; }

  StBin {
    border-radius: 7px;
    padding: 2px;
  }

  &:focus StBin {
    // Trick due to St limitations. It needs a background to draw a box-shadow
    background-color: rgba(0, 0, 0, 0.01);
    box-shadow: inset 0 0 0 2px transparentize($selected_bg_color, .65);
  }

  StIcon {
    icon-size: 14px;
    padding: 1px;

    color: transparent;
    border-radius: 6px;
    border: 2px solid transparentize(if($variant == 'light', black, white), .85);
  }

  &:hover StIcon {
    border-color: transparentize(if($variant == 'light', black, white), .8);
  }

  &:active StIcon {
    border-color: transparentize(if($variant == 'light', black, white), .7);
  }

  &:checked StIcon {
    background-color: $selected_bg_color;
    color: $selected_fg_color;
    border-color: transparent;
  }

  &:checked:hover StIcon {
    background-color: lighten($selected_bg_color, 5%);
    color: lighten($selected_fg_color, 5%);
  }

  &:checked:active StIcon {
    background-color: darken($selected_bg_color, 7%);
    color: darken($selected_fg_color, 7%);
  }
}