Skip to content
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

✨ Tailwind v4 #3208

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

✨ Tailwind v4 #3208

wants to merge 8 commits into from

Conversation

retlehs
Copy link
Member

@retlehs retlehs commented Jan 20, 2025

Ref https://tailwindcss.com/blog/tailwindcss-v4

TODO:

  • Switch to non-beta version

Follow-ups:

  • Dev server + editor CSS

@retlehs retlehs self-assigned this Jan 20, 2025
@retlehs retlehs changed the title 🚧 Tailwind v4 ✨ Tailwind v4 Jan 20, 2025
@retlehs retlehs marked this pull request as ready for review January 20, 2025 21:57
@github-actions github-actions bot added the php Pull requests that update PHP code label Jan 20, 2025
@retlehs retlehs marked this pull request as draft January 20, 2025 22:17
@retlehs retlehs marked this pull request as ready for review January 20, 2025 23:06
@codewithfeeling
Copy link

codewithfeeling commented Jan 21, 2025

This is very promising as a solution to finally getting Sage to work with the API v3 block editor.

The injection works fine folliowing a build with npm build but I can't get it to work in the same way as front styles with hot reloading using npm run dev.

Steps to reproduce:

  1. Add some Tailwind styles in editor.css, for example:
@import "tailwindcss";

.editor-styles-wrapper {
  @apply font-sans bg-blue-50 px-32;
}

.editor-styles-wrapper h1 {
  @apply font-bold text-4xl mb-8;
}

.editor-styles-wrapper p {
  @apply mb-4;
}
  1. Run npm run build - terminal shows the build process output running successfully
  2. Edit a page in wp-admin - styles have been applied as expected:
image
  1. Now run npm run dev - terminal output shows the process is running
  2. Make a change to editor.css, eg. change bg-blue-50 to bg-red-100 and save the file
  3. No changes are observed, even after fully reloading the admin edit page. Expected behaviour is that the changes will apply immediately, as they do on the front side after changing app.css

This means that hot reloading is working on the front but not admin, which is a little confusing.

I can also confirm that installing an API v2 plugin to disable the iframe editor does not fix things. Styles do not hot reload in this scenario.

@retlehs
Copy link
Member Author

retlehs commented Jan 23, 2025

Thank you for testing it out and the feedback! Not yet sure how to tackle the iframe'd editor's CSS in dev mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
php Pull requests that update PHP code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants