Skip to content
Source
Sign inSign up
TanStack/devtools
Open History to see the last commit

example.css

255 lines4.3 KB

1:root {
2 color: #3e3529;
3 background: #f7f5ef;
4 font-family: Inter, ui-sans-serif, system-ui, sans-serif;
5 font-synthesis: none;
6}
7​
8* {
9 box-sizing: border-box;
11​
12body {
13 margin: 0;
14 min-width: 20rem;
15 min-height: 100vh;
16 background:
17 radial-gradient(circle at top right, #eeebd4, transparent 36rem), #f7f5ef;
19​
20button,
21input {
22 font: inherit;
24​
25button,
26a {
27 -webkit-tap-highlight-color: transparent;
29​
30.example-shell {
31 width: min(100% - 2rem, 48rem);
32 margin: 0 auto;
33 padding: clamp(2rem, 7vw, 5rem) 0 7rem;
35​
36.example-header {
37 max-width: 40rem;
38 margin-bottom: 2rem;
40​
41.example-eyebrow {
42 margin: 0 0 0.5rem;
43 color: #624a00;
44 font-size: 0.75rem;
45 font-weight: 700;
46 letter-spacing: 0.1em;
47 text-transform: uppercase;
49​
50.example-header h1,
51.example-content h2,
52.example-content h1 {
53 color: #111111;
54 letter-spacing: -0.035em;
56​
57.example-header h1 {
58 margin: 0;
59 font-size: clamp(2rem, 6vw, 3.25rem);
60 line-height: 1.05;
62​
63.example-header p:not(.example-eyebrow) {
64 max-width: 36rem;
65 margin: 1rem 0 0;
66 color: #756c5b;
67 font-size: 1rem;
68 line-height: 1.6;
70​
71.example-card {
72 margin-top: 1rem;
73 padding: clamp(1rem, 3vw, 1.5rem);
74 border: 1px solid #eeebd4;
75 border-radius: 0.75rem;
76 background: #ffffff;
77 box-shadow:
78 0 1px 2px rgb(17 17 17 / 0.03),
79 0 10px 24px rgb(62 53 41 / 0.05);
81​
82.example-actions {
83 display: flex;
84 align-items: center;
85 justify-content: space-between;
86 gap: 1rem;
88​
89.example-actions p {
90 margin: 0;
91 color: #756c5b;
93​
94.example-actions strong {
95 color: #111111;
96 font-variant-numeric: tabular-nums;
98​
99.example-button-row {
100 display: flex;
101 flex-wrap: wrap;
102 gap: 0.75rem;
104​
105.example-shell button:not([data-testid^='a11y-']) {
106 min-height: 2.5rem;
107 padding: 0.55rem 0.875rem;
108 border: 1px solid #3e3529;
109 border-radius: 0.5rem;
110 background: #3e3529;
111 color: #ffffff;
112 cursor: pointer;
113 font-weight: 650;
114 transition:
115 background-color 120ms ease,
116 border-color 120ms ease,
117 transform 120ms ease;
119​
120.example-shell button:not([data-testid^='a11y-']):hover {
121 border-color: #624a00;
122 background: #624a00;
124​
125.example-shell button:not([data-testid^='a11y-']):active {
126 transform: scale(0.96);
128​
129.example-shell button:disabled {
130 border-color: #eeebd4;
131 background: #eeebd4;
132 color: #3e3529;
133 cursor: not-allowed;
135​
136.example-shell :focus-visible {
137 outline: 3px solid #61adbf;
138 outline-offset: 3px;
140​
141.example-content {
142 color: #3e3529;
143 line-height: 1.65;
145​
146.example-content h2,
147.example-content h1 {
148 margin: 0 0 0.75rem;
149 font-size: 1.25rem;
150 line-height: 1.25;
152​
153.example-content p {
154 max-width: 66ch;
156​
157.example-content a {
158 color: #003e53;
159 font-weight: 650;
160 text-decoration-thickness: 0.1em;
161 text-underline-offset: 0.18em;
163​
164.a11y-audit-fixture {
165 position: fixed;
166 top: 1rem;
167 right: 1rem;
168 display: grid;
169 gap: 0.5rem;
170 padding: 0.5rem;
171 border: 1px dashed #756c5b;
172 border-radius: 0.5rem;
173 background: #ffffff;
175​
176.a11y-audit-fixture button,
177.a11y-audit-fixture input {
178 min-height: 2rem;
180​
181@media (max-width: 36rem) {
182 .example-shell {
183 width: min(100% - 1.5rem, 48rem);
184 padding-top: 1.5rem;
185 }
186​
187 .example-actions {
188 align-items: flex-start;
189 flex-direction: column;
190 }
191​
192 .example-button-row {
193 width: 100%;
194 }
195​
196 .example-button-row button {
197 flex: 1 1 12rem;
198 }
200​
201@media (prefers-color-scheme: dark) {
202 :root {
203 color: #c5c3bf;
204 background: #111111;
205 }
206​
207 body {
208 background:
209 radial-gradient(circle at top right, #003e53, transparent 36rem), #111111;
210 }
211​
212 .example-eyebrow {
213 color: #fae884;
214 }
215​
216 .example-header h1,
217 .example-content h2,
218 .example-content h1,
219 .example-actions strong {
220 color: #ffffff;
221 }
222​
223 .example-header p:not(.example-eyebrow),
224 .example-actions p {
225 color: #aea691;
226 }
227​
228 .example-card,
229 .a11y-audit-fixture {
230 border-color: #2d2d2d;
231 background: #1f1f1f;
232 box-shadow:
233 0 1px 2px rgb(0 0 0 / 0.2),
234 0 10px 24px rgb(0 0 0 / 0.3);
235 }
236​
237 .example-content {
238 color: #c5c3bf;
239 }
240​
241 .example-content a {
242 color: #9cd5e2;
243 }
244​
245 .example-shell button:not([data-testid^='a11y-']) {
246 border-color: #aea691;
247 background: #aea691;
248 color: #111111;
249 }
250​
251 .example-shell button:not([data-testid^='a11y-']):hover {
252 border-color: #ffffff;
253 background: #ffffff;
254 }