forked from hbstack/blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_terms.scss
44 lines (39 loc) · 999 Bytes
/
_terms.scss
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
$hb-terms-colors: ($warning, $success, $danger);
.hb-terms-cloud {
a {
--size: 0;
--color: var(--#{$prefix}primary);
color: var(--color);
font-size: calc(var(--size) * 0.125rem + 0.75rem);
padding: 0.125rem 0.25rem;
position: relative;
text-decoration: none;
&::before {
content: "";
position: absolute;
top: 0;
left: 50%;
width: 0;
height: 100%;
background: var(--color);
transform: translate(-50%, 0);
opacity: 0.125;
transition: width 0.25s;
}
&:hover,
&:focus {
&::before {
width: 100%;
}
}
}
li {
@each $color in $hb-terms-colors {
&:nth-child(#{index($hb-terms-colors, $color) + 1}n + 1) {
a {
--color: #{$color};
}
}
}
}
}