Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidebar docs don't mention editing tailwind config #1610

Open
ptlthg opened this issue Jan 10, 2025 · 3 comments
Open

Sidebar docs don't mention editing tailwind config #1610

ptlthg opened this issue Jan 10, 2025 · 3 comments
Labels
type: documentation A change or addition to the documentation

Comments

@ptlthg
Copy link

ptlthg commented Jan 10, 2025

Change Type

Addition

Proposed Changes

The sidebar instructions say to:

  1. Add the sidebar components
  2. Add CSS variables for colors

These instructions are missing the third step of:

  1. Add the following to theme.extend.colors in your tailwind config file if missing:
sidebar: {
	DEFAULT: "hsl(var(--sidebar-background))",
	foreground: "hsl(var(--sidebar-foreground))",
	primary: "hsl(var(--sidebar-primary))",
	"primary-foreground": "hsl(var(--sidebar-primary-foreground))",
	accent: "hsl(var(--sidebar-accent))",
	"accent-foreground": "hsl(var(--sidebar-accent-foreground))",
	border: "hsl(var(--sidebar-border))",
	ring: "hsl(var(--sidebar-ring))",
},

I'm not sure if a new installation of shadcn-svelte includes this section for you in the config, but I was missing this section after migrating to @next a little while back and was very confused on what I was missing.

@ptlthg ptlthg added the type: documentation A change or addition to the documentation label Jan 10, 2025
@ieedan
Copy link
Contributor

ieedan commented Jan 10, 2025

Re-running init would add the variables to your tailwind.config. npx shadcn-svelte@next init.

Not sure if this necessarily warrants a step in the docs since it is a part of setup and in the migration docs...

@ieedan
Copy link
Contributor

ieedan commented Jan 10, 2025

Actually reading through the migration docs I forgot to mention adding the colors for sidebar in the manual steps. I can open a PR to fix that.

@ptlthg
Copy link
Author

ptlthg commented Jan 10, 2025

Adding it there would be fine too, thanks. I think that at least adding a note to the sidebar page to check the migration guide would be good then, I also saw a post in the discord where someone had the same issue as me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A change or addition to the documentation
Projects
None yet
Development

No branches or pull requests

2 participants