-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
80 lines (70 loc) · 1.33 KB
/
Copy pathstyle.css
File metadata and controls
80 lines (70 loc) · 1.33 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
*,
*::after,
*::before {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
--hue: 10;
--bkg: var(--hue) 40% 98%;
--text: var(--hue) 80% 20%;
--accent: var(--hue) 60% 50%;
}
body {
font-family: system-ui, sans-serif;
display: grid;
gap: 2rem;
place-items: center;
place-content: center;
min-height: 100vh;
padding: 2rem;
background-color: hsl(var(--bkg));
color: hsl(var(--text));
}
h1 {
font-size: 3rem;
}
p {
font-size: 1.5rem;
font-weight: bold;
background-color: hsl(var(--accent));
color: hsl(var(--bkg));
padding: 0.5rem 1.5rem;
border-radius: 100vmax;
}
.gameboard {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0.5rem;
width: 500px;
max-width: 90vw;
aspect-ratio: 1/1;
}
.tile {
border: 2px solid hsl(var(--text));
background-color: hsl(var(--bkg));
border-radius: 0.5rem;
cursor: pointer;
display: grid;
place-items: center;
color: hsl(var(--hue) 60% 50%);
font-weight: bold;
font-size: clamp(2rem, calc(10vw + 1rem), 10rem);
aspect-ratio: 1/1;
}
.tile:focus {
border-color: hsl(var(--hue) 60% 50%);
outline: 3px solid hsl(var(--hue) 60% 50%);
}
.tile[data-value] {
cursor: not-allowed;
}
.tile[data-hover]::before {
content: attr(data-hover);
opacity: 0.5;
}
.tile[data-value]::before {
content: attr(data-value);
opacity: 1;
}