-
Notifications
You must be signed in to change notification settings - Fork 3
/
app.less
58 lines (49 loc) · 1.14 KB
/
app.less
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
html, body {
font-family: "Lato", Helvetica, Arial, sans-serif;
text-align: center;
}
h2 {
margin: 20px 0;
}
// main game container
.game-container {
margin: 20px 0;
.player, .tied, .winning-player {
margin: 10px 0;
}
// tic tac toe board
.game {
// variable to control the width of the board
// having this means I don't have to update the value in 5 different places
@gameSize: 450px;
cursor: pointer;
height: @gameSize;
margin: 0 auto;
width: @gameSize;
.row {
height: @gameSize / 3;
width: 100%;
.cell {
border: 1px solid black;
box-sizing: border-box;
display: inline-block;
height: 100%;
vertical-align: top;
width: @gameSize / 3;
// highlight the cell as green when it also has the class 'winner'
&.winner {
background: green;
}
// inside text that says 'X' or 'O'
span {
display: block;
font-size: 4em;
line-height: @gameSize / 3;
text-align: center;
vertical-align: middle;
width: 100%;
}
}
}
}
}