Skip to content

docs: add Tailwind CSS migration guide#293

Open
alexgrozav wants to merge 7 commits into
mainfrom
larousse/tailwind-migration-guide
Open

docs: add Tailwind CSS migration guide#293
alexgrozav wants to merge 7 commits into
mainfrom
larousse/tailwind-migration-guide

Conversation

@alexgrozav

Copy link
Copy Markdown
Contributor

Summary

Adds a new Migration Guides section under Getting Started, with the first guide: Migrate from Tailwind CSS (closes SF-5).

The audience is the highest-intent one we have — teams already fluent in Tailwind. The guide is built around side-by-side tables mapping the vocabularies:

  • Utilities: spacing, layout/flexbox, sizing, typography, colors/backgrounds/borders — Tailwind class → Styleframe _property:value.
  • Modifiers: hover:/dark:/disabled:_hover:/_dark:/_disabled:, with an honest note that responsive sm:/md: prefixes are not built in (shows the custom breakpoint modifier).
  • Config: @themeuseDesignTokensPreset, including dark mode as a token override.
  • Recipes: CVA / Tailwind Variants → recipe() and use*Recipe.

Files

  • apps/docs/content/docs/01.getting-started/05.migration.md — section landing (mirrors 06.comparisons.md).
  • apps/docs/content/docs/01.getting-started/05.migration/01.tailwind.md — the guide (mirrors the 03.guides pattern).

Verification

  • Token/utility/modifier mappings verified against source, not memory: theme/src/values/* (spacing, fontSize, fontWeight, borderRadius, lineHeight, color, breakpoint), theme/src/utilities/* (class names incl. padding-inline/padding-block), theme/src/modifiers/* and theme/src/presets/useModifiersPreset.ts (confirmed no built-in breakpoint modifier), engine/core/src/tokens/recipe.ts (recipe API).
  • Links: every internal link reuses routes already shipped in published pages (comparisons/tailwind, guides/*, api/utilities, api/utility-modifiers, api/recipes, theme/design-tokens/preset, theme/components) and target files confirmed to exist.
  • MDC components (::note, ::tip, ::warning, ::code-group, ::card) match existing usage across the docs.
  • No changeset — @styleframe/docs is in the changesets ignore list.

Handoff

Per the ticket, code samples must compile — handing the examples to Étoile to verify against the current API before this lands.

Finding (not fixing here)

While verifying, I found the published Create a Design System in 15 Minutes guide claims responsive modifiers (_md:, _sm:_2xl:) ship from useModifiersPreset. Source shows they do not (no breakpoint modifier is registered). Filing separately so it can be corrected without widening this PR.

Add a new "Migration Guides" section under Getting Started with a
Tailwind CSS -> Styleframe guide. Maps utilities, config, modifiers, and
variant helpers (CVA) to Styleframe tokens, `_property:value` utilities,
and recipes with side-by-side tables. All token/utility/modifier
mappings verified against theme/src source.

Closes SF-5
@changeset-bot

changeset-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e89bc22

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
storybook-styleframe-dev Ready Ready Preview, Comment Jul 12, 2026 3:56pm
styleframe-dev Ready Ready Preview, Comment Jul 12, 2026 3:56pm

Request Review

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Modifier factories receive no `key` param (verified against
engine/core/src/tokens/modifier.ts and types/tokens.ts), so the
array-key form could not emit per-breakpoint queries. Replace with one
modifier per breakpoint, each closing over its own width — mirrors
useDarkModifier. Also note the Step 5 recipe fragment layers on the
Step 1 config. Per Étoile review.
The comparison page carried the same non-compiling `({ key })` modifier
snippet as the migration guide (inherited from engine/core/AGENTS.md,
tracked in SF-11). Replace with one modifier per breakpoint closing over
its width.
Mirror the Tooling/Integrations pattern: drop the landing page and use a
folder-level .navigation.yml so Migrations renders as a group header with
the Tailwind guide nested under it. Examples unchanged.
Move the migration folder to top-level 10.migration/ and add it to the
gettingStarted section's folder array in sections.ts, so it renders as a
group header alongside Tooling and Integrations (which are folded into the
same section the same way) at /docs/getting-started/migration/tailwind.
Verified in the browser: Migrations header with the Tailwind guide nested.
Add navigation.title to the page frontmatter so the sidebar entry under
Migrations reads "From TailwindCSS"; page H1 and route unchanged.
Set the page title to "From TailwindCSS" and drop the redundant
navigation.title so the H1 and sidebar label read the same, per Alex.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant