Skip to content

feat: tailwind v3 and v4 support on output - #5438

Open
mimarz wants to merge 11 commits into
feat-config-new-output-fieldfrom
config-output-tailwind
Open

mimarz wants to merge 11 commits into
feat-config-new-output-fieldfrom
config-output-tailwind

Conversation

@mimarz

@mimarz mimarz commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Replaces #5319
Resolves #4317

Support for Tailwind v3 anv v4 using new output field.

@changeset-bot

changeset-bot Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4e105ab

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@digdir/designsystemet Minor
@plugin/designsystemet Minor
@digdir/designsystemet-css Minor
@digdir/designsystemet-react Minor
@digdir/designsystemet-types Minor
@digdir/designsystemet-web Minor

Not sure what this means? Click here to learn what changesets are.

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

@mimarz
mimarz added this pull request to stack #5439 September 28, 2026 12:30
@mimarz mimarz linked an issue Sep 28, 2026 that may be closed by this pull request
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployments for this pull request:

storybook - 1. Oct 2026 - 15:30

www - 1. Oct 2026 - 15:30

@mimarz
mimarz force-pushed the config-output-tailwind branch from 2eac991 to 381f240 Compare September 28, 2026 12:56
@mimarz
mimarz force-pushed the config-output-tailwind branch 2 times, most recently from ce5642d to 154af8c Compare September 29, 2026 08:44
@mimarz
mimarz force-pushed the config-output-tailwind branch from 154af8c to 8c7ce7f Compare September 29, 2026 12:06
Comment thread .changeset/tidy-foxes-wind.md Outdated
Comment thread apps/www/app/content/fundamentals/en/code/cli-config.mdx Outdated
Comment thread apps/www/app/content/fundamentals/no/code/cli-config.mdx Outdated
Comment thread packages/cli/src/schemas/__snapshots__/config.schema.json Outdated
Comment thread packages/css/README.md Outdated
@mimarz
mimarz force-pushed the config-output-tailwind branch 3 times, most recently from 0d699d4 to 1f3026a Compare September 30, 2026 06:53
@mimarz
mimarz requested a balanced review from Copilot September 30, 2026 06:53
@mimarz
mimarz marked this pull request as ready for review September 30, 2026 06:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The v3 output uses an unsupported directive, token matching omits text variables, and migration compatibility is incomplete.

Review effort: Balanced
Findings: 2 Medium severity · 1 Low severity

Open (3)
What changed in this PR

Adds version-selectable Tailwind theme generation to the CLI and documents its use.

Changes:

  • Adds tailwind: "v3" | "v4" | false CSS output configuration.
  • Generates Tailwind theme files with version-specific output.
  • Updates package and website documentation.
File Description
.changeset/​tidy-foxes-wind.md Records the CLI feature.
designsystemet.config.json Enables packaged theme generation.
packages/​css/​README.md Documents Tailwind integration.
packages/​cli/​bin/​deprecated.ts Maps the legacy flag to v3.
packages/​cli/​bin/​designsystemet.ts Passes the selected version.
packages/​cli/​docs/​designsystemet.config.defaults.json Updates documented defaults.
packages/​cli/​src/​schemas/​__snapshots__/​config.schema.json Updates the schema snapshot.
packages/​cli/​src/​schemas/​schema-output.ts Defines the new option.
packages/​cli/​src/​tokens/​build.ts Selects output during builds.
packages/​cli/​src/​tokens/​format.ts Selects output during formatting.
packages/​cli/​src/​tokens/​process/​output/​tailwind.ts Implements versioned generation.
packages/​cli/​src/​tokens/​process/​platform.ts Updates Tailwind option types.
apps/​www/​app/​content/​fundamentals/​en/​code/​cli-config.mdx Documents English CLI configuration.
apps/​www/​app/​content/​fundamentals/​en/​code/​css.mdx Adds English usage guidance.
apps/​www/​app/​content/​fundamentals/​no/​code/​cli-config.mdx Documents Norwegian CLI configuration.
apps/​www/​app/​content/​fundamentals/​no/​code/​css.mdx Adds Norwegian usage guidance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/cli/src/schemas/schema-output.ts
Comment thread packages/cli/src/tokens/process/output/tailwind.ts
Comment thread packages/css/README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The v3 branch emits a v4-only directive, and existing Tailwind configurations silently lose their generated output.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity · 1 Low severity

Open (4)

Comment thread packages/cli/src/tokens/process/output/tailwind.ts
@mimarz
mimarz force-pushed the config-output-tailwind branch from f5938a1 to 6aa2b60 Compare September 30, 2026 07:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The CSS package README incorrectly identifies v4 as the default despite generation defaulting to false.

Review effort: Balanced
Findings: None

Resolved since last review (2)

Comment thread packages/css/README.md Outdated
@mimarz
mimarz requested a review from eirikbacker October 1, 2026 07:00
@mimarz
mimarz force-pushed the config-output-tailwind branch from 320e934 to 1ce8193 Compare October 1, 2026 08:10
@mimarz
mimarz force-pushed the config-output-tailwind branch 5 times, most recently from c97951f to e34ff5a Compare October 1, 2026 11:11
@mimarz
mimarz force-pushed the config-output-tailwind branch 4 times, most recently from acd8551 to 1839dfe Compare October 1, 2026 13:04
@mimarz
mimarz force-pushed the config-output-tailwind branch from 1839dfe to 4e105ab Compare October 1, 2026 13:22

This branch has not been deployed

No deployments
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.

Use @theme inline in tailwind.css

4 participants