-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
102 lines (93 loc) 路 2.55 KB
/
Copy pathstyle.css
File metadata and controls
102 lines (93 loc) 路 2.55 KB
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
@import "https://necolas.github.io/normalize.css/8.0.1/normalize.css";
@import "https://fonts.googleapis.com/css?family=Passion+One";
:root {
--bg-color: snow;
--pad-bg: rgba(13, 13, 13, 0.2);
--pad-active: tomato;
--text-color: rgba(255, 250, 250, 0.5);
--velocity: 1;
}
@media (prefers-color-scheme: dark) {
:root {
--bg-color: #353839; /* Black Onyx Pantone color */
--pad-bg: rgba(255, 250, 250, 0.1);
--pad-active: crimson;
--text-color: rgba(255, 250, 250, 0.1);
}
}
body {
display: flex;
align-items: center;
justify-content: center;
background: var(--bg-color);
color: var(--text-color);
font-family: "Passion One", cursive;
position: absolute;
inset: 0;
user-select: none;
touch-action: manipulation;
}
section {
overflow: hidden;
}
section.pads {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-auto-rows: 1fr;
grid-template-areas:
"cy cb sp"
"lt mt ht"
"cp rs oh"
"bd sd ch";
gap: 0.1em;
font-size: 5vmin;
width: min(100vw, 75vh);
height: calc(min(100vw, 75vh) * 4/3);
max-width: 100vw;
max-height: 100vh;
}
@media (orientation: landscape) {
section.pads {
grid-template-columns: repeat(4, 1fr);
grid-template-areas:
"lt mt ht sp"
"cp rs oh cb"
"bd sd ch cy";
height: min(100vh, 75vw);
width: calc(min(100vh, 75vw) * 4/3);
max-width: 100vw;
max-height: 100vh;
}
}
section.pads .pad {
display: flex;
align-items: center;
justify-content: center;
position: relative;
background: var(--pad-bg);
color: var(--text-color);
transition: background 0.3s ease-in, transform 0.3s ease-in;
-webkit-tap-highlight-color: transparent;
touch-action: none;
--velocity: 1;
aspect-ratio: 1 / 1; /* Ensure pads are always square */
}
section.pads .pad:active,
section.pads .pad.active {
background: var(--pad-active);
transform: scale(0.95);
transition-duration: 0.1s;
--velocity: 1;
}
section.pads .pad[data-sound="cb"] { grid-area: cb; }
section.pads .pad[data-sound="cy"] { grid-area: cy; }
section.pads .pad[data-sound="sp"] { grid-area: sp; }
section.pads .pad[data-sound="lt"] { grid-area: lt; }
section.pads .pad[data-sound="mt"] { grid-area: mt; }
section.pads .pad[data-sound="ht"] { grid-area: ht; }
section.pads .pad[data-sound="ch"] { grid-area: ch; }
section.pads .pad[data-sound="oh"] { grid-area: oh; }
section.pads .pad[data-sound="rs"] { grid-area: rs; }
section.pads .pad[data-sound="bd"] { grid-area: bd; }
section.pads .pad[data-sound="sd"] { grid-area: sd; }
section.pads .pad[data-sound="cp"] { grid-area: cp; }