-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathstyle.css
More file actions
121 lines (104 loc) · 2.25 KB
/
Copy pathstyle.css
File metadata and controls
121 lines (104 loc) · 2.25 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
:root {
--space: 1rem;
--bg: #09090b;
--fg: #e3e3e3;
--surface-1: #101012;
--surface-2: #27272a;
--surface-3: #52525b;
--ease-out: cubic-bezier(0.5, 1, 0.89, 1);
--ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
}
* {
box-sizing: border-box;
}
height,
body {
height: 100%;
}
body {
display: grid;
color: var(--fg);
background: var(--bg);
padding: var(--space);
min-height: 100vh;
}
main {
display: grid;
grid-template-columns: repeat(var(--count, 1), 1fr);
gap: var(--space);
margin: auto;
inline-size: min(var(--max, 15rem), 100%);
@media (min-width: 25rem) {
--count: 2;
--max: 30rem;
}
@media (min-width: 45rem) {
--count: 4;
--max: 60rem;
}
}
.card {
position: relative;
overflow: hidden;
display: grid;
grid-template-areas: "card";
place-items: center;
aspect-ratio: 4/5;
border: 1px solid var(--surface-2);
isolation: isolate;
transition: border-color 200ms var(--ease-out);
user-select: none;
&::before {
content: "";
position: absolute;
inset: 0;
background: radial-gradient(circle at bottom left, transparent 55%, var(--surface-1));
pointer-events: none;
box-shadow: var(--bg) -0.5cqi 0.5cqi 2.5cqi inset;
transition: opacity 900ms var(--ease-out);
}
&::after {
content: "";
position: absolute;
inset: 0;
margin: auto;
aspect-ratio: 1;
background: radial-gradient(circle, var(--bg), transparent 65%);
opacity: 0;
transition: opacity 800ms var(--ease-out);
}
> * {
grid-area: card;
}
svg {
position: relative;
z-index: 1;
width: 30%;
height: auto;
color: var(--surface-3);
transition: 300ms var(--ease-out);
transition-property: color, scale;
}
button {
opacity: 0;
}
&:focus-within {
outline: 5px auto Highlight;
outline: 5px auto -webkit-focus-ring-color;
}
&:where(:hover, :focus-within) {
border-color: var(--active-color, var(--fg));
transition: border-color 800ms var(--ease-in-out);
}
&:where(:hover, :focus-within) svg {
color: var(--active-color, var(--fg));
scale: 1.1;
transition: 300ms var(--ease-in-out);
}
&:where(:hover, :focus-within)::before {
opacity: 0;
}
&:where(:hover, :focus-within)::after {
opacity: 1;
}
}