Skip to content

Commit 0535043

Browse files
committed
undo demo.css change
1 parent 6faac2f commit 0535043

File tree

1 file changed

+246
-3
lines changed

1 file changed

+246
-3
lines changed

playgrounds/demo/demo.css

Lines changed: 246 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,246 @@
1-
h1 {
2-
font-family: 'Cairo';
3-
}
1+
body {
2+
--bg-1: hsl(0, 0%, 100%);
3+
--bg-2: hsl(206, 20%, 90%);
4+
--bg-3: hsl(206, 20%, 80%);
5+
--fg-1: hsl(0, 0%, 13%);
6+
--fg-2: hsl(0, 0%, 20%);
7+
--fg-2: hsl(0, 0%, 30%);
8+
--link: hsl(208, 77%, 47%);
9+
--link-hover: hsl(208, 77%, 55%);
10+
--link-active: hsl(208, 77%, 40%);
11+
--border-radius: 4px;
12+
--font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
13+
'Open Sans', 'Helvetica Neue', sans-serif;
14+
--font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono',
15+
monospace;
16+
background: var(--bg-1);
17+
color: var(--fg-1);
18+
font-family: var(--font);
19+
line-height: 1.5;
20+
margin: 1rem;
21+
height: calc(100vh - 2rem);
22+
}
23+
24+
h1,
25+
h2,
26+
h3,
27+
h4,
28+
h5,
29+
h6 {
30+
font-weight: normal;
31+
font-variant-numeric: tabular-nums;
32+
line-height: 1.1;
33+
}
34+
35+
:is(h1, h2, h3, h4, h5, h6, p) {
36+
margin: 1rem 0.1rem;
37+
}
38+
39+
label {
40+
margin: 0.5rem 0.1rem;
41+
}
42+
43+
:is(h1, h2, h3, h4, h5, h6, p, label):first-child {
44+
margin-top: 0;
45+
}
46+
47+
:is(h1, h2, h3, h4, h5, h6, p, label):last-child {
48+
margin-bottom: 0;
49+
}
50+
51+
a {
52+
color: var(--link);
53+
}
54+
55+
a:hover {
56+
color: var(--link-hover);
57+
}
58+
59+
a:active {
60+
color: var(--link-active);
61+
}
62+
63+
label {
64+
display: flex;
65+
gap: 0.5rem;
66+
align-items: center;
67+
}
68+
69+
label input {
70+
margin: 0;
71+
}
72+
73+
button,
74+
input,
75+
select {
76+
font-family: inherit;
77+
font-size: inherit;
78+
}
79+
80+
button {
81+
background: var(--link);
82+
color: var(--bg-1);
83+
padding: 0.5rem 1rem;
84+
border: none;
85+
border-radius: var(--border-radius);
86+
}
87+
88+
button:hover {
89+
background: var(--link-hover);
90+
}
91+
92+
button:active {
93+
background: var(--link-active);
94+
}
95+
96+
:is(button, button:hover, button:active):disabled {
97+
background: var(--link);
98+
filter: grayscale(1);
99+
opacity: 0.4;
100+
}
101+
102+
input,
103+
textarea,
104+
select {
105+
padding: 0.5rem;
106+
border: 1px solid var(--bg-2);
107+
border-radius: var(--border-radius);
108+
box-sizing: border-box;
109+
}
110+
111+
input,
112+
textarea {
113+
background: var(--bg-1);
114+
}
115+
116+
select:not([multiple]) {
117+
background: var(--bg-2);
118+
}
119+
120+
textarea {
121+
font-family: var(--font-mono);
122+
font-size: 0.9rem;
123+
}
124+
125+
form {
126+
display: flex;
127+
flex-direction: column;
128+
gap: 1rem;
129+
align-items: baseline;
130+
}
131+
132+
ul:has(li):has(form) {
133+
list-style: none;
134+
padding: 0;
135+
}
136+
137+
li form {
138+
flex-direction: row;
139+
gap: 0.5rem;
140+
margin: 0.5rem 0;
141+
}
142+
143+
nav {
144+
position: relative;
145+
display: flex;
146+
gap: 1em;
147+
padding: 1em;
148+
background: var(--bg-2);
149+
z-index: 2;
150+
margin: 0 0 1em 0;
151+
border-radius: var(--border-radius);
152+
}
153+
154+
nav a {
155+
text-decoration: none;
156+
}
157+
158+
nav a[aria-current='true'] {
159+
border-bottom: 2px solid;
160+
}
161+
162+
ul:has(form) {
163+
list-style: none;
164+
padding: 0;
165+
}
166+
167+
progress {
168+
margin: 0.5rem 0;
169+
}
170+
171+
progress:first-child {
172+
margin-top: 0;
173+
}
174+
175+
progress:lsat-child {
176+
margin-bottom: 0;
177+
}
178+
179+
.error {
180+
color: red;
181+
}
182+
183+
code {
184+
background: var(--bg-2);
185+
font-family: var(--font-mono);
186+
font-size: 0.9em;
187+
padding: 0.15rem 0.3rem;
188+
border-radius: var(--border-radius);
189+
}
190+
191+
ul.todos {
192+
padding: 0;
193+
}
194+
195+
ul.todos li:not(:has(> form)),
196+
ul.todos li form {
197+
position: relative;
198+
display: flex;
199+
align-items: center;
200+
padding: 0.5em 0.5em 0.5em 1em;
201+
margin: 0 0 0.5em 0;
202+
gap: 0.5em;
203+
border-radius: 5px;
204+
user-select: none;
205+
background: var(--bg-1);
206+
filter: drop-shadow(2px 3px 6px rgba(0, 0, 0, 0.1));
207+
transition:
208+
filter 0.2s,
209+
opacity 0.2s;
210+
}
211+
212+
ul.todos .done {
213+
filter: none;
214+
opacity: 0.4;
215+
}
216+
217+
ul.todos button {
218+
border: none;
219+
background-color: transparent;
220+
background-repeat: no-repeat;
221+
background-position: 50% 50%;
222+
background-size: 1rem 1rem;
223+
cursor: pointer;
224+
width: 3em;
225+
height: 3em;
226+
margin: -0.5em -0.5em -0.5em 0;
227+
aspect-ratio: 1;
228+
opacity: 0.5;
229+
transition: opacity 0.2s;
230+
}
231+
232+
ul.todos button:hover {
233+
opacity: 1;
234+
}
235+
236+
body.dark {
237+
--bg-1: hsl(0, 0%, 18%);
238+
--bg-2: hsl(0, 0%, 30%);
239+
--bg-3: hsl(0, 0%, 40%);
240+
--fg-1: hsl(0, 0%, 90%);
241+
--fg-2: hsl(0, 0%, 70%);
242+
--fg-3: hsl(0, 0%, 60%);
243+
--link: hsl(206, 96%, 72%);
244+
--link-hover: hsl(206, 96%, 78%);
245+
--link-active: hsl(206, 96%, 64%);
246+
}

0 commit comments

Comments
 (0)