Repository navigation
Expand file tree
/
Copy pathmain.css
More file actions
153 lines (123 loc) · 2.39 KB
/
Copy pathmain.css
File metadata and controls
153 lines (123 loc) · 2.39 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/* Setting background and font */
body {
font-size: 1em;
font-family: 'Roboto', sans-serif;
background-color: #f5f5f5;
margin: 0px;
}
h2 {
font-size: 200%;
margin: 0px;
}
table {
text-align: center;
}
#states {
height: 600px;
overflow: scroll;
}
/* Setting shape and background of candidate boxes */
#dem-votes {
background-color: #acc0ec;
border-radius: 10px 0px 0px 10px;
}
#rep-votes {
background-color: #ff9e99;
border-radius: 0px 10px 10px 0px;
}
/* Colours for the change in electoral votes */
.change-loss {
color: red;
}
.change-gain {
color: green;
}
.change-none {
color: black;
}
/* Setting height of vote progress bar */
.progress {
height: 64px;
margin: 30px 0px;
font-size: 1.3em;
}
#biden-bar {
background-color: #244999;
}
#trump-bar {
background-color: #e50a00;
}
#middle-bar {
background-color: #aaaaaa;
}
.thead-grey {
background-color: #dddddd;
}
/* Setting background of td elements based on the candidate for that state */
td.rep {
background-color: #ff9e99;
}
td.dem {
background-color: #acc0ec;
}
/* Each candidate box is a 3x2 grid */
.votes-wrapper {
width: 100%;
margin: 0;
padding: 0;
display: inline-grid;
grid-template-columns: auto auto auto;
grid-template-rows: auto auto;
}
/* Size and center the candidate boxes*/
#votes {
max-height: 200px;
margin: auto;
padding: 0;
}
/* Make each candidate box half of the parent div */
#votes > div{
width: 50%;
display: inline-flex;
text-align: center;
margin: 10px 0px;
padding: 25px 0;
}
/* Rules for the text inside candidate boxes*/
/* Vertically align the candidate's names and votes */
.centered {
margin: auto;
}
/* Biden's name takes up entire left hand side of grid */
#biden {
grid-row: 1/ span 2;
grid-column: 1;
}
#dem-votes-num {
grid-row: 1/ span 2;
grid-column: 3;
}
/* Trump's name takes up entire right hand side of grid*/
#trump {
grid-row: 1/ span 2;
grid-column: 3;
}
#rep-votes-num {
grid-row: 1/ span 2;
grid-column: 1;
}
/* Distance from 270 is in middle column on bottom row */
.distance {
grid-row: 2;
grid-column: 2;
}
.bold {
font-weight: bold;
}
/* Making the background of the control panel darker */
#controls {
background-color: #dddddd;
padding: 20px;
border-radius: 5px;
margin: 0 0 30px 0;
}