Skip to content

Commit a9a5e6d

Browse files
committed
Update @layerstack/tailwind and replace tailwind.config.cjs with css-based config
1 parent 7ebceeb commit a9a5e6d

File tree

5 files changed

+32
-391
lines changed

5 files changed

+32
-391
lines changed

packages/svelte-ux/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"@layerstack/svelte-actions": "^1.0.0",
5858
"@layerstack/svelte-stores": "^1.0.0",
5959
"@layerstack/svelte-table": "^1.0.0",
60-
"@layerstack/tailwind": "^1.0.0",
60+
"@layerstack/tailwind": "https://pkg.pr.new/@layerstack/tailwind@32",
6161
"@layerstack/utils": "^1.0.0",
6262
"@mdi/js": "^7.4.47",
6363
"culori": "^4.0.1",

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { redirect } from '@sveltejs/kit';
22
import { getThemeNames } from '@layerstack/tailwind';
3+
import themeCss from '@layerstack/tailwind/themes/all.css?raw';
34

45
import { env } from '$env/dynamic/private';
56

6-
import themes from '../../themes.json' with { type: 'json' };
7-
87
export async function load({ url }) {
98
// Redirect `svelte-ux.vercel.app` to `svelte-ux.techniq.dev`
109
if (url.host === 'svelte-ux.vercel.app') {
@@ -14,7 +13,7 @@ export async function load({ url }) {
1413
}
1514

1615
return {
17-
themes: getThemeNames(themes),
16+
themes: getThemeNames(themeCss),
1817
// themes: { light: ['light'], dark: ['dark'] },
1918
pr_id: env.VERCEL_GIT_PULL_REQUEST_ID,
2019
};

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

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
@import 'tailwindcss';
22

3-
@config '../../tailwind.config.cjs';
3+
@import '@layerstack/tailwind/theme.css';
4+
@import '@layerstack/tailwind/themes/all.css';
5+
@import '@layerstack/tailwind/utils.css';
46

57
/*
68
The default border color has changed to `currentColor` in Tailwind CSS v4,
@@ -16,7 +18,8 @@
1618
::before,
1719
::backdrop,
1820
::file-selector-button {
19-
border-color: color-mix(in oklab, hsl(var(--color-surface-content) / 1) 20%, transparent);
21+
border-color: color-mix(in oklab, var(--color-surface-content) 20%, transparent);
22+
outline-color: color-mix(in oklab, var(--color-surface-content) 20%, transparent);
2023
}
2124
}
2225

packages/svelte-ux/tailwind.config.cjs

-72
This file was deleted.

0 commit comments

Comments
 (0)