Newer
Older
.hy-checkbox {
display: inline-block;
position: relative;
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
}
.hy-checkbox__checkmark {
border-color: var(--link-blue);
border-style: solid inset solid solid;
border-width: 2px;
height: 20px;
margin-right: 6px;
position: relative;
width: 20px;
svg {
bottom: 0;
left: 0;
position: absolute;
visibility: hidden;
}
&::before {
background-color: var(--grayscale-white);
content: '';
height: 10px;
position: absolute;
right: 0;
transform: rotate(40deg) translate(6%, -55%);
visibility: hidden;
width: 8px;
}
}
.hy-checkbox__label {
@include font-size(14px, 20px);
align-items: center;
color: var(--grayscale-black);
display: inline-flex;
font-family: var(--main-font-family);
letter-spacing: -0.4px;
@include breakpoint($narrow) {
@include font-size(16px, 24px);
}
}
.hy-checkbox__checkbox {
height: 100%;
margin: 0;
opacity: 0;
position: absolute;
width: 100%;
z-index: 10;
&:checked {
& + label {
color: var(--grayscale-black);
.hy-checkbox__checkmark {
svg,
&::before {
visibility: visible;
}
}
}
}
&:hover {
cursor: pointer;
& + label {
color: var(--brand-main);
}
}
&:focus {
& + label {
outline-offset: 1px;
outline: 2px solid var(--link-blue);
}
}
}