-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
in_favor_against.scss
92 lines (76 loc) · 1.83 KB
/
in_favor_against.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
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
84
85
86
87
88
89
90
91
92
.in-favor-against {
@include flex-with-gap($line-height * 0.25);
@include breakpoint(medium) {
@include flex-with-gap($line-height * 0.75);
}
&,
.in-favor,
.against,
form {
display: inline-block;
}
button {
background: #fff;
border-radius: rem-calc(3);
color: $dark-gray;
display: inline-block;
font-size: rem-calc(30);
line-height: rem-calc(30);
padding: rem-calc(3) rem-calc(6) rem-calc(6);
position: relative;
&[aria-pressed=true] {
border-style: inset;
border-width: 3px 2px 2px 3px;
&:active {
border-style: outset;
border-width: 2px 3px 3px 2px;
}
}
&[aria-pressed=false] {
border-style: outset;
border-width: 2px 3px 3px 2px;
&:active {
border-style: inset;
border-width: 3px 2px 2px 3px;
}
}
}
@mixin like-unlike-icon($icon, $pressed-color) {
@include has-fa-icon($icon, regular);
&:not([disabled]) {
cursor: pointer;
&[aria-pressed=false]:hover,
&[aria-pressed=false]:active {
@include has-fa-icon($icon, solid);
}
&[aria-pressed=true] {
@include has-fa-icon($icon, solid);
background: $pressed-color;
border-color: $pressed-color;
color: #fff;
&:hover,
&:active {
@include has-fa-icon($icon, regular);
}
}
}
}
.in-favor button {
@include like-unlike-icon(thumbs-up, $like);
}
.against button {
@include like-unlike-icon(thumbs-down, $unlike);
}
.percentage {
display: inline-block;
font-size: $small-font-size;
line-height: $line-height * 2;
padding-right: calc(#{$line-height} / 2);
vertical-align: top;
@include breakpoint(medium) {
display: block;
line-height: $line-height;
padding-right: 0;
}
}
}