feat: set up Tailwind CSS, shadcn/ui and Lucide icons #53
+7,011
−2,428
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Sets up Tailwind CSS 4, shadcn/ui and Lucide icons, so the interface issues (#40–#48) can be built on the same components and icons from the start. It is initialisation only: no page uses the components yet. It also contains what was in the separate Tailwind PR (#55, closed), so Tailwind and shadcn/ui are one change.
What is in it
@/alias (@/meanssrc/). The alias usespathsonly, because TypeScript 6 deprecatesbaseUrl, which the shadcn/ui guide still tells us to add.components.json, thecnhelper insrc/lib/utils.ts, and one component (src/components/ui/button.tsx).lucide-react). The README shows how to import an icon and how to label an icon-only button for screen readers.button.test.tsx) that renders a Button with an icon. It shows that the alias, the component and the icon work together, and needs no browser environment.src/components/ui/, because the generated components also export helpers such asbuttonVariants.docs/AI_USAGE.mdhas an entry.Choices (from #51)
base-novaon Base UIcnpackageclsx+tailwind-merge.data-theme="dark"src/styles/variables.css, and not a.darkclass.devDependenciesshadcn,tailwindcssand the others underdependencies. They are only needed to build, so only 16 packages are needed in production (the lock file grows by about 300 packages, all from these tools).What this does to the page
--borderand--accentexist in both the Vite starter styles and shadcn/ui. The CLI changed them in place, so shadcn/ui's values win. The starter styles go when the real page is built.Base branch
This PR is on top of
dev.src/styles/variables.css(PR #35) is only onmainso far, so the README and a comment insrc/index.cssmention a file thatdevdoes not have yet. It arrives whenmainanddevare brought together.Not done (still open in #51)
--background,--foreground,--primary…). Our tokens insrc/styles/variables.cssare separate. Connecting them is a design decision, and there are two things to look at first:--background-coloris declared twice invariables.css. The second value (#BDE981, the D-value green) wins and becomes the page background.[data-theme="dark"]block is nested inside:root { … }, so it matches a descendant of the root and not the page itself. Dark mode does not apply as written.Testing
A temporary component with
p-4 bg-red-500showed that used Tailwind classes are in the built CSS and an unused class (m-37) is not. The file is not in the PR.npm run lint,npm run build(includingtsc -b),npm testandnpm run typecheck -w backendpass, and the dev server starts. The lock file only adds packages: none removed and no version changed.Part of #51
Closes #54
🤖 Generated with Claude Code