forked from lpaladin/tsTetris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.scss
154 lines (132 loc) · 3.17 KB
/
app.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
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
@font-face {
font-family: 'fzxs12';
src: url('Tetris/st_pixel12-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
body {
overflow: hidden;
}
canvas {
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
height: 100vh;
width: 100vw;
image-rendering: optimizeSpeed;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-optimize-contrast;
image-rendering: optimize-contrast;
image-rendering: pixelated;
-ms-interpolation-mode: nearest-neighbor;
}
.btn {
position: relative;
display: block;
padding: 0.3em 0.6em;
background-color: rgb(203, 236, 255);
box-shadow: grey 4px 4px 0;
box-sizing: border-box;
cursor: pointer;
font-weight: bold;
color: dimgray;
font-family: fzxs12, -apple-system, "BlinkMacSystemFont", "Helvetica Neue", "Arial", "PingFang SC", "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "Microsoft JhengHei", "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", "WenQuanYi Micro Hei", SimSun, sans-serif;
z-index: 10;
margin-bottom: 1em;
user-select: none;
}
.bad-font .btn {
font-family: -apple-system, "BlinkMacSystemFont", "Helvetica Neue", "Arial", "PingFang SC", "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "Microsoft JhengHei", "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", "WenQuanYi Micro Hei", SimSun, sans-serif;
}
.tip {
display: none;
margin: 0;
position: absolute;
top: 100%;
left: 100%;
white-space: nowrap;
background-color: rgba(0, 0, 0, 0.5);
padding: 0.5em;
color: white;
font-size: 0.8em;
}
.btn:hover .tip {
display: block;
}
.btn:hover {
background-color: rgba(128, 128, 128, 0.49);
}
.btn:active {
box-shadow: grey 2px 2px 0;
transform: translate(2px, 2px);
}
.left, .right {
position: fixed;
top: 1em;
z-index: 10;
}
.left {
left: 1em;
}
body.not-player-turn .left {
display: none;
}
.right {
right: 1em;
}
.content {
position: fixed;
display: none;
top: 10vh;
bottom: 10vh;
left: 10vw;
right: 10vw;
background-color: rgba(255, 255, 255, 0.8);
border: 2px solid black;
z-index: 10;
}
.help-trigger:hover + .content {
display: block;
}
table {
table-layout: auto;
width: 100%;
height: 100%;
border-collapse: separate;
font-family: -apple-system, "BlinkMacSystemFont", "Helvetica Neue", "Arial", "PingFang SC", "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "Microsoft JhengHei", "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", "WenQuanYi Micro Hei", SimSun, sans-serif;
}
th, td {
border: 4px solid transparent;
text-align: center;
vertical-align: middle;
}
th {
font-weight: bold;
background-color: rgba(221, 221, 221, 0.80);
}
thead td {
background-color: rgba(203, 203, 203, 0.80);
font-weight: bold;
}
tbody td {
background-color: rgba(239, 239, 239, 0.80);
}
.info {
background-color: rgba(255, 229, 171, 0.80);
}
.btn:after {
content: "";
display: none;
position: absolute;
left: 0;
right: 0;
top: 50%;
height: 2px;
background-color: gray;
transform: translateY(-1px) rotate(45deg);
}
.btn.disabled:after {
display: block;
}