-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): bump to tailwind 4.0 (#1327)
This is [a new major version of Tailwind CSS][release-announcement], which includes a lot of breaking changes. This commit updates the project to use the new version. A lot of changes were required to accommodate this. We drop the `@astrojs/tailwind` plugin since it's not been ported to 4.0 yet. What that does is bridge between Starlight and Tailwind, and this is something we can do manually by taking the few definitions that are needed. As this implies, the way Tailwind works has changed a fair bit. There's no Javascript config file any more - it's all done in CSS instead. So the configuration has had an overhaul. Some of the classes have changed too. This, and the dropping of the plugin, meant that the styles broke a bit. We have ported to be more Tailwind-native to fix this. This means dropping most of the inline css `<style>` blocks in our components and using the Tailwind native utililty classes instead. The notable exception is the `TableOfContentsList` component which is quite custom and so is left for later. There are some minor visual differences but overall it should look broadly the same. Finally, we've installed some Prettier plugins for Astro and Tailwind, and ran the code through them. [release-announcement]: https://blog.tailwindcss.com/tailwindcss-v4
- Loading branch information
Showing
14 changed files
with
621 additions
and
842 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pnpm-lock.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
{ | ||
"endOfLine": "lf", | ||
"overrides": [ | ||
{ | ||
"files": "*.astro", | ||
"options": { | ||
"parser": "astro" | ||
} | ||
} | ||
], | ||
"plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"], | ||
"singleQuote": true, | ||
"tabWidth": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,14 +12,15 @@ | |
"@astrojs/check": "^0.9.4", | ||
"@astrojs/starlight": "^0.31.1", | ||
"@astrojs/starlight-tailwind": "^3.0.0", | ||
"@astrojs/tailwind": "^5.1.4", | ||
"@fontsource-variable/inter": "^5.1.1", | ||
"@tailwindcss/vite": "^4.0.0", | ||
"astro": "^5.1.7", | ||
"sharp": "^0.33.5", | ||
"tailwindcss": "^3.4.17", | ||
"tailwindcss": "^4.0.0", | ||
"typescript": "^5.7.3" | ||
}, | ||
"devDependencies": { | ||
"prettier": "^3.4.2" | ||
} | ||
}, | ||
"packageManager": "[email protected]+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0" | ||
} |
Oops, something went wrong.