-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP]: tailwind v4 #7507
base: main
Are you sure you want to change the base?
[WIP]: tailwind v4 #7507
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
something that may help you:
and for css module: https://tailwindcss.com/docs/compatibility#css-modules |
Yep, with that I made the first commit, I thought it was going to do most of the work |
Note Your Pull Request seems to be updating Translations of the Node.js Website. Whilst we appreciate your intent; Any Translation update should be done through our Crowdin Project. Thank you! |
Hey @bjohansebas I assume this is still a WIP? |
Yep, I'll continue with this later. |
tysm for your contributions <3 |
I think I'll continue after you all have done the migration to the new version of Next.js. |
@bjohansebas bump claudio had merge the pr. You can have fun with git conflict 😁 |
908dbb9
to
9859b48
Compare
ad5f1c0
to
e3eb8a5
Compare
@@ -33,7 +33,7 @@ | |||
} | |||
|
|||
.title { | |||
@apply rounded-sm | |||
@apply rounded-xs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did the values change between xs and sm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -19,8 +19,7 @@ | |||
@apply max-h-80 | |||
w-48 | |||
overflow-hidden | |||
rounded | |||
border | |||
rounded-sm border |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rounded-sm border | |
rounded-sm | |
border |
@@ -15,14 +15,14 @@ | |||
} | |||
|
|||
.trigger { | |||
@apply inline-flex | |||
@apply r | |||
ounded-sm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ounded-sm | |
rounded-sm |
This is almost done, the only thing is that I still haven't managed to get Next.js to compile. It throws an error (not sure if it's still due to the Tailwind configuration or a bug in Tailwind). The development mode is already working for the most part. |
h-11 | ||
w-full | ||
min-w-[17rem] | ||
items-center | ||
justify-between | ||
items-center justify-between |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
items-center justify-between | |
items-center | |
justify-between |
@@ -43,5 +43,7 @@ export default { | |||
'import-notation': 'string', | |||
// Allow the `@apply` at rule as its part of Tailwind | |||
'at-rule-no-deprecated': [true, { ignoreAtRules: ['apply'] }], | |||
'at-rule-no-unknown': null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have a rule with at-rule-unknown. Please remove this one.
@@ -43,5 +43,7 @@ export default { | |||
'import-notation': 'string', | |||
// Allow the `@apply` at rule as its part of Tailwind | |||
'at-rule-no-deprecated': [true, { ignoreAtRules: ['apply'] }], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'at-rule-no-deprecated': [true, { ignoreAtRules: ['apply'] }], | |
'at-rule-no-deprecated': [true, { ignoreAtRules: [CUSTOM_AT_RULES] }], |
@@ -43,5 +43,7 @@ export default { | |||
'import-notation': 'string', | |||
// Allow the `@apply` at rule as its part of Tailwind | |||
'at-rule-no-deprecated': [true, { ignoreAtRules: ['apply'] }], | |||
'at-rule-no-unknown': null, | |||
'function-no-unknown': null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of disabling the rule, please provide the correct functions that should be allowlisted.
w-full | ||
items-center | ||
justify-between; | ||
@apply inline-flex w-full items-center justify-between; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not inline the styles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, my auto formatter played a trick on me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(For the whole file)
announcement: tailwindConfig.theme.colors.green['700'], | ||
release: tailwindConfig.theme.colors.info['600'], | ||
vulnerability: tailwindConfig.theme.colors.warning['600'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I know how to make this work, I'll do it another day.
@@ -1,3 +1,5 @@ | |||
@reference "../../../../styles/index.css"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary? Can you point to docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, can you write the reference of these like // @see ....
@import './locals.css'; | ||
@import './locals.css' layer(utilities); | ||
|
||
@theme { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe export all these colors to a theme.css fle
--animate-pulse: pulse 500ms infinite alternate-reverse; | ||
--animate-pulse-dark: pulse-dark 500ms infinite alternate-reverse; | ||
|
||
@keyframes surf { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Id move all of these animations to an animations.css
@import './base.css'; | ||
@import './markdown.css'; | ||
@import 'tailwindcss'; | ||
@import './base.css' layer(utilities); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Id be good to explain what these "layer" keywords mean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea, it was done by the Tailwind upgrade tool, which didn’t really help much either.
scrollbar-width: thin; | ||
} | ||
|
||
@utility max-w-8xl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was removed?
Yeah something weird is broken. The instructions seem super simple: https://tailwindcss.com/docs/installation/framework-guides/nextjs Not sure if this has any effect, https://github.com/nodejs/nodejs.org/blob/main/apps/site/next.config.mjs#L96 or if it is due to something you're importing or not? Maybe it could be those Worth opening an issue on Tailwind repo tho. |
Nope I already faced to this issue. Basically tailwind is broken with css-module and tailwind maintainer don't care and didn't recommend to use it. First tings to check:
if this check is done it's maybe a bug |
I have the feeling maybe because we do the @reference on each CSS module file? 🤔 which provably tries to bundle the whole thing on every css module file?
A lot of people use CSS modules. Could tou reference where the maintainer said they did not care about it? |
About maintainer position it's personal feeling. but about css module https://tailwindcss.com/docs/compatibility#performance |
Description
Updated to Tailwind 4 :), still a work in progress
Check List
npm run format
to ensure the code follows the style guide.npm run test
to check if all tests are passing.npx turbo build
to check if the website builds without errors.