summaryrefslogtreecommitdiff
path: root/public/style.css
blob: f2113e0c228a1a91fcaf38cebc2ab2cf7156fb59 (plain)
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
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Rubik", sans-serif;
  transition-timing-function: ease-in-out;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  text-align: center;

          user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

h1 {
  padding: .3em;
  text-transform: uppercase;
  font-size: 6vw;
}

#help-btn { float: left; }
#settings-btn, #stats-btn { float: right; }

#board {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

#board table {
  table-layout: fixed;
  border-spacing: .5vw;
  width: 55%;
}

#keyboard {
  width: 100%;
  table-layout: fixed;
  border-spacing: 1vw;
}

#board td, td[data-key] {
  background: #eee;
  padding: 0.5em;
  font-size: 4vw;
  border-radius: 2vw;
}

td[data-key] { cursor: pointer }

td[data-key=enter]::after,
td[data-key=bspc]::after {
  content: "";
  display: block;
  margin: 0 auto;
  width: 0;
  height: 0;
  border: 1.5vw solid transparent;
}

td[data-key=enter]::after {
  border-left: 2.4vw solid #000;
  border-right-width: 0;
}

td[data-key=bspc]::after {
  border-right: 2.4vw solid #000;
  border-left-width: 0;
}

td[data-key]:hover { box-shadow: 0 0 0 3px #0002; }
td.absent  { background: #aaa }
td.present { background: #f9c74f }
td.found   { background: #90be6d }

footer p {
  padding: 0 0 .6em;
  font-size: 3vw;
}

@media (min-width:701px) {
  h1 { font-size: 42px }

  #board table {
    width: 385px;
    border-spacing: 3.5px;
  }

  #keyboard {
    width: 700px;
    margin: 0 auto;
    border-spacing: 7px;
  }
  #board td, td[data-key] {
    font-size: 28px;
    border-radius: 14px;
  }
  td[data-key=enter]::after,
  td[data-key=bspc]::after {
    border: 10.5px solid transparent;
  }
  td[data-key=enter]::after {
    border-left: 17px solid #000;
    border-right-width: 0;
  }
  td[data-key=bspc]::after {
    border-right: 17px solid #000;
    border-left-width: 0;
  }

  footer p { font-size: 21px }
}