aboutsummaryrefslogtreecommitdiffstats
path: root/src/css/imports/_states.css
blob: f8f22a7bd6d322f8f4dca9ef9860ba7a86abf055 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* Focus states */
input:focus, textarea:focus a:focus {
  box-shadow: 0 0 0 2px var(--primary);
  outline: 0;
}

button:focus {
  box-shadow: 0 0 0 4px var(--primary);
  outline: 0;
}

.raise {
  transition: var(--hover-transition);
  transform: translateY(0) translateZ(0);
}

.raise:hover,
.raise:focus {
  transition: var(--hover-transition);
  transform: translateY(-.12rem) translateZ(0);
}

.raise:active {
  transition: var(--hover-transition);
  opacity: .5;
}

.hide-child .child {
  opacity: 0;
  transition: opacity .15s ease-in;
}
.hide-child:hover  .child,
.hide-child:focus  .child,
.hide-child:active .child {
  opacity: 1;
  transition: opacity .15s ease-in;
}

.underline-hover:hover,
.underline-hover:focus {
  text-decoration: underline;
}

/* Can combine this with overflow-hidden to make background images grow on hover
 * even if you are using background-size: cover */

.grow {
  -moz-osx-font-smoothing: grayscale;
  backface-visibility: hidden;
  transform: translateZ(0);
  transition: transform 0.25s ease-out;
}

.grow:hover,
.grow:focus {
  transform: scale(1.05);
}

.grow:active {
  transform: scale(.90);
}

.grow-large {
  -moz-osx-font-smoothing: grayscale;
  backface-visibility: hidden;
  transform: translateZ(0);
  transition: transform .25s ease-in-out;
}

.grow-large:hover,
.grow-large:focus {
  transform: scale(1.2);
}

.grow-large:active {
  transform: scale(.95);
}

/* Add pointer on hover */

.pointer:hover {
  cursor: pointer;
}