remark-frontmatter-starter
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v672View latest version
Replace existing custom CSS in src/
and styles/
with Tailwind CSS and Daisy UI components, in incremental steps with tests after each.
Tasks:
- No installation required.
- In
head.ts
head, add:<link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" /> <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script> <link href="https://cdn.jsdelivr.net/npm/daisyui@5/themes.css" rel="stylesheet" type="text/css" />
Stop and test: Reload the app, add a Daisy UI class (e.g. btn
) to a component, verify the style applies.
Tasks:
- Locate any global resets (e.g. reset.css) in
styles/
. - Move necessary rules into Tailwind’s
@layer base
inindex.css
. - Comment out or remove old import statements in
src/index.tsx
orApp.tsx
.
Stop and test: Confirm global styles (default fonts, margins) remain appropriate.
Tasks:
- Inventory components using custom CSS classes (search
className="
insrc/
). - For one component at a time:
- Replace class names with Tailwind/Daisy UI classes.
- Remove related CSS rules from
styles/
.
Stop and test: Verify component layout and styles.
Tasks:
- Identify common UI patterns (buttons, cards, forms).
- Replace with Daisy UI prebuilt classes (e.g.
btn
,card
).
Stop and test: Check visual consistency and responsiveness.
Tasks:
- Replace custom grid/flex layouts with Tailwind utilities.
- Update margins, paddings to use utility classes.
Stop and test: Validate page layouts across breakpoints.
Tasks:
- Delete unused CSS files in
styles/
. - Remove obsolete imports in code.
- Run production build to confirm no CSS errors.
Stop and test: Build succeeds, UI unchanged.
Proceed one step at a time and pause after each for testing.