refactor: migrate Tailwind CSS v3 to v4 with CSS-first config#17905
refactor: migrate Tailwind CSS v3 to v4 with CSS-first config#17905pettinarip wants to merge 8 commits intodevfrom
Conversation
ee9f81a to
097a282
Compare
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Replace JS config (tailwind.config.ts) with CSS-first config (@config in global.css) - Migrate postcss.config.js to postcss.config.mjs with @tailwindcss/postcss - Reorganize CSS into focused files: base.css, theme.css, utilities.css, semantic-tokens.css - Migrate renamed/removed utilities: rounded, shadow, outline, ring, opacity classes - Convert space-y patterns to gap where needed, resolve negative margin conflicts - Fix variant selectors: not-[:first] → not-[:first-child], last variant on alert - Move custom utilities (staking-grid, area-glyph) to @Utility for variant support - Use @theme inline for nested .dark containers to resolve semantic tokens correctly - Import docsearch CSS into cascade layer to restore library styles - Add json loader for .all-contributorsrc in storybook webpack config - Fix leading-base setting --tw-leading on code elements - Remove first heading top margin in content pages for v4 compat - Update 100+ components with renamed utility classes
ed78066 to
d61e4e6
Compare
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
May be related to tailwind-merge v3 class resolution or a Tailwind v4 color scale change. Urdu ordered list numbering regression https://ethereum.org/ur/whitepaper/#ethereum-state-transition-function (Correct) /* Code blocks are always LTR -- programming languages read left-to-right.
On RTL pages (ar, ur) the inherited direction makes code unreadable. */
pre:has(code) {
direction: ltr;
text-align: left;
}
/* Apply Urdu numerals to ordered lists when the locale is ur */
:lang(ur) ol {
list-style-type: urdu;
}
/* Fallback for older browsers that don't support urdu counter style */
@supports not (list-style-type: urdu) {
:lang(ur) ol {
list-style-type: persian;
}
}These were recently added to Otherwise spot checking is looking good so far! |
…igration # Conflicts: # src/components/Nav/index.tsx


Summary
@tailwindcss/upgradetool, converting from JS config to CSS-first configtailwindcss-animatewithtw-animate-css, upgradestailwind-mergeto v3, updatesprettier-plugin-tailwindcsstheme()calls tovar(), removes redundant@tailwind basedirectives, deletes customnotvariant plugin (built-in in v4)bg-gradient-to-*→bg-linear-to-*,flex-shrink-*→shrink-*, etc.)global.css(890 lines) into focused single-responsibility files:global.css— thin import manifest +@custom-variant darktheme.css—@theme inlineblock (Tailwind v4 CSS-first config)base.css—@layer baseelement defaults (typography, links, lists)utilities.css— all@utilitydirectives (gradients, grid, z-index, staking)docsearch.css— DocSearch library overridessemantic-tokens.css— consolidated all:root/.darkvariable declarations@layer components/@layer utilitieswith@utilitydirectives (v4 best practice)@keyframesinside@themeblock, co-located with their--animate-*tokens.gold,.dev-ring) and duplicate DocSearch rulesNo bundler change — still using
--webpack. Turbopack switch is in a follow-up PR.Stack
refactor/storybook-10-upgrade-webpack(PR refactor: upgrade Storybook 8.6 to 10.3 with webpack #17900)refactor/turbopack-adoption(Turbopack switch)Test plan
pnpm build --webpacksucceedspnpm build-storybooksucceeds