Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
183 lines (175 loc) · 4.09 KB
/
Copy pathstyle.css
File metadata and controls
183 lines (175 loc) · 4.09 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
body {
margin: 0;
/* Clear the default margin of the body */
position: fixed;
/* Make the body always occupy the full screen */
min-width: 480px;
width: 100%;
height: 100%;
}
.container {
position: relative;
width: 100%;
top: 50%;
margin: 0;
}
.board {
width: 480px;
height: 480px;
position: relative;
top: 50%;
transform: translateY(-36%);
/*Center the board vertically*/
margin-left: auto;
margin-right: auto;
/*Center the board horizontally*/
}
.tray {
font-size: 3em;
min-height: 2.125em;
width: 100%;
position: absolute;
top: calc(-36% - 2.125em - (100% - 36% - 2.125em)/6);
/* Center the .word vertically above the board */
text-align: center;
/* Center the .word horizontally within the board */
transition: background-color 0.5s;
}
.tray.player1 {
background-color: rgba(255, 67, 46, 0.25);
}
.tray.player2 {
background-color: rgba(119, 200, 245, 0.25);
}
.tray i {
position: absolute;
top: 50%;
transform: translateY(-50%);
}
.tray #reset {
left: 0.375em;
cursor: pointer;
}
.tray i {
color: grey;
}
.tray i:hover {
transition: 0.5s;
color: #555;
}
.word {
display: inline-block;
/* Necessary to be affected by text-align in .tray */
margin-left: auto;
margin-right: auto;
}
.word i.status-display {
visibility: hidden;
right: 0.375em;
}
.invalid.word .invalid.status-display {
visibility: visible;
color: rgba(255, 128, 128, 1);
}
.valid.word .valid.status-display {
visibility: visible;
cursor: pointer;
color: rgba(128, 255, 128, 1);
}
.valid.word .valid.status-display {} @font-face {
font-family: "Museo Sans Rounded";
src: url(https://s3-us-west-2.amazonaws.com/dgmde15slush/museosansrounded-300-webfont.ttf) format("truetype");
}
.played .cell {
opacity: 0.5;
}
.cell {
text-align: center;
font-family: "Museo Sans Rounded", sans-serif;
text-transform: uppercase;
/* Make all our letters uppercase */
font-size: 3em;
line-height: 2.125em;
}
.board .cell {
position: absolute;
width: calc(100%/5);
height: calc(100%/5);
/* Set the width and height of cells for a 5x5 board */
display: inline-block;
/* We want the divs to sit alongside one another */
}
.word .cell {
font-size: 1em;
height: 100%;
width: 1.5em;
float: left;
/* When the .cells are in .word, we want them to slide to the left, alongside each other */
}
.board .cell.even {
background-color: rgba(240, 239, 236, 0.5);
/*
Style cells which are the even-numbered children of .board
You can read more at https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child
and https://css-tricks.com/almanac/selectors/n/nth-child/
*/
}
.board .cell.odd {
background-color: rgba(240, 239, 236, 1);
/*
Style cells which are the odd-numbered children of .board
You can read more at https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child
and https://css-tricks.com/almanac/selectors/n/nth-child/
*/
}
.scoreboard {
position: absolute;
width: calc((100% - 480px)/2*0.9);
height: 480px;
top: calc(-36%);
font-family: "Museo Sans Rounded";
}
.scoreboard h3 {
width: 100%;
text-align: center;
}
.scoreboard.winning h3 {
text-transform: uppercase;
color: rgba(67, 255, 46, 1);
}
.scoreboard li {
text-transform: uppercase;
}
.scoreboard .score:empty {
visibility: hidden;
}
.scoreboard .score:before {
content: "(";
}
.scoreboard .score:after {
content: ")";
}
#player1 {
left: 1.5%;
}
#player2 {
right: 1.5%;
}
.board .cell.player1, #player1 {
background-color: rgba(255, 67, 46, 0.375);
}
.board .cell.player2, #player2 {
background-color: rgba(119, 200, 245, 0.375);
}
.board .surrounded.cell.player1 {
background-color: rgba(255, 67, 46, 0.5);
}
.board .surrounded.cell.player2 {
background-color: rgba(119, 200, 245, 0.5);
}
#player1, .tray.player1 {
background-color: rgba(255, 67, 46, 0.125);
}
#player2, .tray.player2 {
background-color: rgba(119, 200, 245, 0.125);
}