Skip to content

Commit 6351584

Browse files
authored
feat(styled kit): tailwind v4 update (#1122)
* chore: migration script * fix: tailwind 4 @source * fix: global css using @source * chore: transition theme * chore: transform hsl() to oklch(from var(...) l c h) * fix: collapsible and accordion animations * fix: modal is no longer centered by default * docs: headless modal margins * fix: border-width and stroke-width theme css variables * fix: shadows and press animations * docs: update modal code * chore: copy global.css for cli * refactor: cli install tailwind 4 * chore: copy-css-config base global.css config appended * fix: qwik-ui, popover-polyfill layers order * refactor: add base @layer and @import to extract-theme * chore: remove tailwind.config.cjs cli handling * fix: cli tests config * fix: component-tests * test: extract-theme-css * fix: CI cli-e2e * fix: shadows * chore: format all * chore: update components mdx * chore: reset action.yml * chore: remove tailwind.extend_template * test: update setup-tailwind-generator.spec * chore: fix extract-theme-css shadows extraction * chore: fix simple and brutalist shadows * fix: extract-theme storke width * update: styled install docs * chore: update extract-theme.css base theme * chore: update styled install * fix: CI utils snapshots * chore: prettierrc tailwindStylesheet * fix: extract-theme-css extra curly brace * fix: let the cli install tw-animate-css instead of tailwindcss-animate * docs: update install deps * test: cli update snapshots * test: utils:test update snapshots * chore: changesets * fix: cli package.json utils version * docs: add migration guide * docs: add legacy page * docs: non breaking note * fix: carousel start slide width
1 parent 4338aca commit 6351584

File tree

151 files changed

+7595
-8061
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+7595
-8061
lines changed

.changeset/fair-hoops-taste.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@qwik-ui/headless': patch
3+
---
4+
5+
fix: the accordion `offsetHeight` is now properly calculated with tailwind v4.

.changeset/mean-books-act.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@qwik-ui/styled': minor
3+
'qwik-ui': minor
4+
---
5+
6+
feat: Qwik UI has now fully migrated and updated the global.css config and components to use tailwind v4. You can copy/paste the components into your project(s) or use the CLI.
7+
8+
## Migration guide:
9+
10+
- Make sure to commit any changes before you start the steps below
11+
- Run the `npx @tailwindcss/upgrade` script and let it do most of the work for you
12+
- Remove your tailwind.config.cjs and postcss.config.cjs
13+
- install the @tailwindcss/vite package and pass it to your vite.config plugins array
14+
- Copy paste the new css config base tokens, or use the `qwik-ui init` to get them, and adapt them to your project
15+
- If you are in a monorepo, make sure to `@source “../../../path/to/your/components“;`
16+
- Add `"w-full"` to Modal PanelVariants position.top and position.bottom; add `"m-auto"` to position.center
17+
- If you didn't modify some components, you can re-copy/paste (or re-install them with the cli) for their most up to date version

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"trailingComma": "all",
55
"printWidth": 90,
66
"plugins": ["prettier-plugin-tailwindcss"],
7-
"tailwindConfig": "./apps/website/tailwind.config.cjs",
7+
"tailwindStylesheet": "./apps/website/src/global.css",
88
"tailwindFunctions": ["clsx", "cva"]
99
}

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
55
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
66
],
7+
"tailwindCSS.experimental.configFile": "apps/website/src/global.css",
78
"editor.codeActionsOnSave": {
89
"source.removeUnusedImports": "explicit"
910
},

apps/component-tests/postcss.config.cjs

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)