Skip to content
Source
Sign inSign up
samwillis/one-million-boxes
Open History to see the last commit

Footer.css

117 lines2.3 KB

1/* Floating HUD controls leave the board playable in the gaps between them. */
2.footer {
3 position: absolute;
4 bottom: var(--minimap-margin);
5 left: var(--minimap-margin);
6 right: var(--minimap-margin);
7 height: var(--bottom-controls-height);
8 display: grid;
9 grid-template-columns: minmax(56px, 1fr) auto minmax(56px, 1fr);
10 align-items: end;
11 gap: 12px;
12 z-index: 10;
13 pointer-events: none;
15​
16.footer-left {
17 display: flex;
18 align-items: center;
20​
21.footer-move-dial {
22 --dial-size: var(--bottom-dial-size);
23 --dial-count-size: 19px;
24 --dial-label-size: 8px;
25 pointer-events: auto;
27​
28/* Keep the accessible readout, but let drawing input through the hidden dial. */
29.game-layout:has(.drawing-cursor[data-visible="true"]) .footer-move-dial {
30 opacity: 0;
31 pointer-events: none;
33​
34.footer-link {
35 display: flex;
36 align-items: center;
37 gap: 6px;
38 padding: 8px 12px;
39 border: var(--hud-border-width) solid var(--hud-outline);
40 border-radius: var(--hud-radius);
41 font-size: 0.875rem;
42 font-weight: 650;
43 background: var(--color-accent);
44 color: var(--color-text);
45 box-shadow: var(--hud-shadow);
46 pointer-events: auto;
47 transition:
48 background-color var(--transition-fast),
49 box-shadow var(--transition-fast),
50 transform var(--transition-fast);
52​
53.footer-link:hover {
54 background: var(--color-accent-hover);
56​
57.footer-link:active {
58 transform: translateY(2px);
59 box-shadow: 0 1px 0 var(--hud-edge);
61​
62.footer-link svg {
63 flex-shrink: 0;
64 opacity: 0.8;
66​
67.footer-link-mobile {
68 display: none;
70​
71@media (max-width: 1030px) {
72 .footer-link-extra {
73 display: none;
74 }
76​
77@media (max-width: 768px) {
78 .footer {
79 gap: 8px;
80 }
81​
82 .footer-link-desktop {
83 display: none;
84 }
85​
86 .footer-link-mobile {
87 display: inline;
88 }
89​
90 .footer-link {
91 min-height: var(--touch-min);
92 padding: 8px 10px;
93 font-size: 0.75rem;
94 }
96​
97/* Anchor the link at the bottom even when the fixed dial follows the cursor. */
98@media (max-width: 600px) {
99 .footer-link {
100 position: absolute;
101 left: 0;
102 bottom: 0;
103 }
104​
105 .footer-left {
106 position: absolute;
107 left: 0;
108 bottom: calc(var(--touch-min) + 12px);
109 }
111​
112@media (max-height: 480px) and (orientation: landscape) {
113 .footer-move-dial {
114 --dial-count-size: 15px;
115 --dial-label-size: 6px;
116 }