diff --git a/packages/svelte-ux/src/routes/+page.svelte b/packages/svelte-ux/src/routes/+page.svelte index f37607741..192b0f93a 100644 --- a/packages/svelte-ux/src/routes/+page.svelte +++ b/packages/svelte-ux/src/routes/+page.svelte @@ -33,7 +33,7 @@
Add Svelte UX package
- + {:else if selectedTab === 'manual'}
Follow the Tailwind @@ -42,93 +42,57 @@
Add Svelte UX package
- + {/if} {#if selectedTab === 'svelte-cli' || selectedTab === 'manual'} -
Update tailwind.config.cjs
+
Update app.css
+:root { + --color-primary: var(--color-purple-700); + --color-secondary: var(--color-orange-500); + + &.dark { + --color-primary: var(--color-purple-400); + --color-surface-100: var(--color-zinc-900); + --color-surface-200: var(--color-zinc-950); + --color-surface-300: var(--color-black); + } +} +`} + language="css" /> {/if} -

A few notes regarding the tailwind.config.cjs

- -
    -
  • - {`./node_modules/svelte-ux/**/*.{(svelte, js)}`} adds the library classes via - JIT -
  • + Theme setup: +
    • - ux.themes is used to configure the theme colors. See - customization for more details. + The line @import '@layerstack/tailwind/themes/basic.css'; in the CSS example + above provides basic light and dark theme support. If you require multiple light/dark themes, + or want to use pre-built themes like Skeleton or Daisy UI (which is what the Svelte UX + docs + use), you should replace this line with + @import '@layerstack/tailwind/themes/all.css';.
    • - Tailwind plugin injects the theme color variables, sets border, outline, ring, and typograpy - defauls based on the theme, and adds additional utility classes including: -
        -
      • - elevation-# for - realistic shadows - using multiple shadow layers, unlike the current Tailwind - shadows - which have at most 2 layers. -
      • -
      • - grid-stack to easily stack grid children -
      • -
      • - scrollbar-none to hide the scrollbar -
      • -
      + @layerstack/tailwind (the theme system used by Svelte UX) was migrated to be css-only. You can + see the source on the next branch here
    diff --git a/shell.nix b/shell.nix new file mode 100644 index 000000000..211363925 --- /dev/null +++ b/shell.nix @@ -0,0 +1,8 @@ +{ pkgs ? import {} }: + +pkgs.mkShell { + buildInputs = with pkgs; [ + nodejs + pnpm + ]; +} \ No newline at end of file