Skip to content

Commit fbbba40

Browse files
committed
Move global styles to app.css
1 parent f68e69e commit fbbba40

File tree

2 files changed

+50
-52
lines changed

2 files changed

+50
-52
lines changed

packages/svelte-ux/src/routes/+layout.svelte

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -301,55 +301,3 @@
301301
<slot />
302302
</main>
303303
</AppLayout>
304-
305-
<style lang="postcss">
306-
:global(body) {
307-
@apply bg-surface-200 accent-primary;
308-
/* background-image:
309-
radial-gradient(at 0% 0%, hsl(var(--color-secondary) / 0.33) 0px, transparent 50%),
310-
radial-gradient(at 98% 1%, hsl(var(--color-primary) / 0.33) 0px, transparent 50%); */
311-
}
312-
313-
:global(nav h1) {
314-
@apply py-2 pl-4 mt-4 text-sm text-surface-content font-bold bg-surface-200 border-t border-b;
315-
}
316-
317-
:global(nav h2) {
318-
@apply pt-4 pb-2 pl-4 text-xs text-surface-content font-bold;
319-
}
320-
321-
:global(main h1:not(.prose *, .related *, .ApiDocs *)) {
322-
@apply text-xl font-semibold mt-4 mb-2 border-b pb-1;
323-
scroll-margin-top: 128px; /* sticky header */
324-
}
325-
326-
:global(main h2:not(.prose *, .related *, .ApiDocs *)) {
327-
@apply text-lg font-semibold mt-4 mb-1;
328-
scroll-margin-top: 128px; /* sticky header */
329-
}
330-
331-
:global(main h3:not(.prose *, .related *, .ApiDocs *)) {
332-
@apply text-xs text-surface-content/50 mb-1;
333-
scroll-margin-top: 128px; /* sticky header */
334-
}
335-
:global(main :not(.prose) h2 + h3) {
336-
@apply -mt-1;
337-
}
338-
339-
:global(main small) {
340-
@apply text-xs text-surface-content/50 inline-block;
341-
}
342-
343-
:global(.TableOfContents small) {
344-
@apply hidden;
345-
}
346-
347-
/* Code/Preview backgrounds */
348-
:global(pre[class*='language-']) {
349-
@apply bg-surface-content;
350-
}
351-
352-
:global(.dark pre[class*='language-']) {
353-
@apply bg-surface-300;
354-
}
355-
</style>

packages/svelte-ux/src/routes/app.css

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
11
@tailwind base;
22
@tailwind components;
33
@tailwind utilities;
4+
5+
body {
6+
@apply bg-surface-200 accent-primary;
7+
/* background-image:
8+
radial-gradient(at 0% 0%, hsl(var(--color-secondary) / 0.33) 0px, transparent 50%),
9+
radial-gradient(at 98% 1%, hsl(var(--color-primary) / 0.33) 0px, transparent 50%); */
10+
}
11+
12+
nav h1 {
13+
@apply py-2 pl-4 mt-4 text-sm text-surface-content font-bold bg-surface-200 border-t border-b;
14+
}
15+
16+
nav h2 {
17+
@apply pt-4 pb-2 pl-4 text-xs text-surface-content font-bold;
18+
}
19+
20+
main h1:not(.prose *, .related *, .ApiDocs *) {
21+
@apply text-xl font-semibold mt-4 mb-2 border-b pb-1;
22+
scroll-margin-top: 128px; /* sticky header */
23+
}
24+
25+
main h2:not(.prose *, .related *, .ApiDocs *) {
26+
@apply text-lg font-semibold mt-4 mb-1;
27+
scroll-margin-top: 128px; /* sticky header */
28+
}
29+
30+
main h3:not(.prose *, .related *, .ApiDocs *) {
31+
@apply text-xs text-surface-content/50 mb-1;
32+
scroll-margin-top: 128px; /* sticky header */
33+
}
34+
main :not(.prose) h2 + h3 {
35+
@apply -mt-1;
36+
}
37+
38+
main small {
39+
@apply text-xs text-surface-content/50 inline-block;
40+
}
41+
42+
.TableOfContents small {
43+
@apply hidden;
44+
}
45+
46+
/* Code/Preview backgrounds */
47+
pre[class*='language-'] {
48+
@apply bg-surface-content;
49+
}
50+
51+
.dark pre[class*='language-'] {
52+
@apply bg-surface-300;
53+
}

0 commit comments

Comments
 (0)