summaryrefslogtreecommitdiff
path: root/style.css
blob: b074ea195d2eec5db09f7a3d3a9befb9203a70ca (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
body {
	font-family: sans-serif;
	--piece-width: 50px;
	--piece-height: 50px;
	--image: url("");
	--image-width: 640px;
	--image-height: 480px;
	margin: 0;
	position: relative;
}
body.margined {
	margin: 0.5em;
}
.form-line {
	display: block;
	margin: 0.5em 0;
}

#header {
	height: 1.5em;
	padding: 5px;
	border-bottom: 1px solid black;
	background: #eee;
}

a, a:visited {
	color: #08a;
	text-decoration: none;
}

#header a {
	padding: 0 0.5em;
}

#header button {
	border: 2px solid #000;
	background: #ddd;
}
#header button:hover {
	border: 2px solid #000;
	background: #bbb;
}
#header button:active {
	border: 2px solid #000;
	background: #999;
}

#play-area {
	width: 100vw;
	/* annoyingly, firefox ESR 115 still doesn't support lh */
	height: calc(100vh - 1.5em);
	padding: 0;
	position: relative;
	user-select: none;
}

.piece {
	position: absolute;
	width: calc(var(--piece-width) + 2 * var(--nib-size));
	height: calc(var(--piece-height) + 2 * var(--nib-size));
	background-image: var(--image);
	background-size: var(--image-width) var(--image-height);
	transition: top 0.3s ease-in-out, left 0.3s ease-in-out;
}

.no-animation {
	transition: none !important;
}

.debug-point {
	position: absolute;
	width: 1px;
	height: 1px;
	z-index: 999999;
	background-image: none;
}
.debug-relative {
	position: relative;
	width: 100%;
	height: 100%;
}