Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 12, 2025

  • Update package.json to use Tailwind CSS 4.1 and remove PostCSS dependencies
  • Convert all // comments to /* */ format in CSS files
  • Convert tailwind.config.js to CSS-based configuration in style.css
  • Rename pcss directory and files to css for TW4 compatibility
  • Update RoboFile.php to use Tailwind CLI instead of PostCSS
  • Remove postcss.config.js and tailwind.config.js (no longer needed)
  • Add @tailwindcss/cli package for CLI binary
  • Fix import paths and theme variable names
  • Test the build process - compilation successful!
  • Verify output CSS is generated correctly - 52KB minified
  • Address code review feedback with documentation
  • Fix @theme configuration to preserve default utilities
  • Final verification complete - all default colors now generated
Original prompt

This section details on the original issue you should resolve

<issue_title>Update to Tailwind 4</issue_title>
<issue_description>- Use latest https://tailwindcss.com/ v 4.1

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits December 12, 2025 17:44
- Updated package.json to use Tailwind CSS 4.1
- Removed PostCSS dependencies (no longer needed)
- Converted style.pcss to use Tailwind 4 CSS-based configuration
- Converted all // comments to /* */ format in PCSS files
- Updated RoboFile.php to use Tailwind CLI instead of PostCSS
- Removed postcss.config.js and tailwind.config.js (not needed in TW4)

Co-authored-by: amitaibu <125707+amitaibu@users.noreply.github.com>
- Renamed src/pcss directory to src/css
- Renamed all .pcss files to .css files
- Updated imports in style.css to reference .css files
- Updated RoboFile.php to use new css directory path

Co-authored-by: amitaibu <125707+amitaibu@users.noreply.github.com>
- Added @tailwindcss/cli package for Tailwind CLI binary
- Fixed @import paths to use relative paths (./filename.css)
- Fixed --max-width-8xl theme variable naming
- Fixed user.css to directly apply utilities instead of custom class
- Successfully tested CSS compilation with Tailwind 4.1.18
- Verified both normal and minified builds work correctly

Co-authored-by: amitaibu <125707+amitaibu@users.noreply.github.com>
- Document why container-wide utilities are inlined in user.css (TW4 limitation)
- Document custom breakpoints match Drupal breakpoint configuration
- Verified build still works after comment additions

Co-authored-by: amitaibu <125707+amitaibu@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Tailwind CSS to version 4.1 Upgrade to Tailwind CSS 4.1 Dec 12, 2025
Copilot AI requested a review from amitaibu December 12, 2025 17:55
@amitaibu
Copy link
Member

Close, but not there yet

image

@amitaibu
Copy link
Member

amitaibu commented Dec 12, 2025

@copilot Looking at this element

<a href="https://example.com" class="  relative rounded-lg border border-gray-300 w-full h-full overflow-hidden
     flex flex-col gap-3 md:gap-5
 group justify-between p-6 overflow-hidden bg-gray-200 hover:bg-gray-700">

   ...

</a>

I see that bg-gray-X are missing. They miss also in other elements, so something with the config is off

The previous @theme configuration was overriding default colors and breakpoints.
In Tailwind 4, @theme should only define extensions, not replacements.

Removed custom breakpoint and font-family definitions from @theme block,
keeping only the actual custom extensions (max-width-8xl and text-underline-offset-6).

This ensures all default Tailwind utilities like bg-gray-50, bg-gray-200, etc.
are generated in the compiled CSS.

Fixes missing background color utilities reported in review.

Co-authored-by: amitaibu <125707+amitaibu@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 12, 2025

@copilot Looking at this element

...

Fixed in a63587d. The issue was that the @theme configuration was overriding default Tailwind colors and breakpoints instead of extending them. In Tailwind 4, @theme should only define custom extensions, not replace defaults.

Removed the font-family and breakpoint definitions from @theme, keeping only the actual custom properties (max-width-8xl and text-underline-offset-6). All default color utilities including bg-gray-50 and bg-gray-200 are now generated correctly.

@amitaibu
Copy link
Member

amitaibu commented Dec 12, 2025

@copilot I'm seeing the background colors defined, but they are struck out

image

The issue is that normalize overrides it

image

@amitaibu
Copy link
Member

Removed core's normalize in favor of TW's one. Now backgrounds are working fine

Selection_999(5673)

@amitaibu amitaibu marked this pull request as ready for review December 14, 2025 15:35
@amitaibu amitaibu marked this pull request as draft December 14, 2025 15:36
@amitaibu
Copy link
Member

The menu is still off

Header Menu open
image image

@balagan73 let's give it a 3h TB to try and fix, and do some QA, to find changes between this PR and the version on main

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.

Update to Tailwind 4

3 participants