Cette extension n’a pas été testée avec plus de trois mises à jour majeures de WordPress. Elle peut ne plus être maintenue ou supportée et peut avoir des problèmes de compatibilité lorsqu’elle est utilisée avec des versions de WordPress plus récentes.

TailPress – Tailwind for WordPress

Description

Tailwind CSS is a great companion to building block based sites in WordPress. Unfortunately, it’s been pretty complicated to add Tailwind CSS to WordPress since it needs to be compiled with Node.js in order to be production ready.

This plugin takes care of that by adding Tailwind CSS to WordPress in one easy step (activate the plugin) and at the same time takes care of performance and caching so your site remains fast and production ready!

Who It’s For

This is primarily for developers and users that are familiar with Tailwind CSS and comfortable styling their site using their utility class framework.

It’s also for those who have struggled to add Tailwind to their workflow without having to constantly compile their CSS every time the classes in their page content changes.

How it Works

  • Extrait les classes des pages et les compile côté serveur dans Tailwind CSS
  • Caches the dynamically generated CSS to avoid performance issues on the frontend of your production site.

Êtes-vous affilié au thème tailpress.io ?

Non, nous ne le sommes pas ! Malheureusement, le même nom a été utilisé pour les deux par coïncidence, mais nous ne sommes pas affiliés et nous sommes deux solutions différentes. Tailpress.io est un excellent point de départ pour développer des thèmes personnalisés avec une intégration en profondeur de Tailwind. Je le recommande à tout développeur/développeuse qui souhaite créer un thème personnalisé dépendant fortement de Tailwind.

Tailpress, cette extension, ajoute le support de Tailwind à n’importe quel projet en tant que module. Elle peut être utilisée autant ou aussi peu que vous le souhaitez, ajouté à des thèmes personnalisés ou préexistants.

Can this be used in production?

Yes! Although the styles in the backend get generated on the fly, the CSS on the frontend gets cached for every page. Changing any classes on the page will bust the cache automatically so it’ll still stay up to date with any changes.

Can this be used outside the block editor?

Yes! This will work anywhere on the backend or front end of your site that uses classes to style things.

Known Issues

Mode de prévisualisation des appareils dans l’éditeur de blocs

The non-desktop preview modes in the block editor utilize an iframe and don’t load assets properly. Therefore your Tailwind styles won’t be visible here.

Cache pour les pages

Si votre site a des pages mises en cache, vous devrez vider votre cache pour bénéficier d’une expérience optimale.

Installation

This section describes how to install the plugin and get it working.

  1. Upload tailpress to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Simply add classes anywhere you would like in your pages, for example under the « Additional CSS class(es) » of any of your blocks.
  4. That’s it! It should just work.

Vous pouvez configurer votre version de Tailwind sous « réglages » > « TailPress ».

Avis

16 octobre 2024
I found myself often wishing to add inline styles in guttenberg editor, then I thought, how cool would it be to use Tailwind classes in the advanced section of blocks. And I found this plugin that worked without any configuration and it seams to do it with optimizations. From time to time when using a new class you haven’t used on this site, it doesn’t work. All you need to do is to go to this plugin settings and clear the cache. Then the class is working. Thanks a lot to the developer! Live long and prosper!
17 janvier 2024
I tried several complicated ways to use tailwind with wp themes without node.js on the server. This plugin works and makes it incredibly easy. With the nice addition of also getting tw in the block editor. I have had some problems with classes not being recognized, but that seems to be solved by the cache cleaning button in the tailpress settings. This is also where you can edit the tailwind config, i found out, which was a bit confusing having to write json instead of js, and the invalid json just being erased on saving without any explanation. Would be nice to be told more explicitely that this is where the config is located, how to write it in json, maybe some example(s) of what/how you can write, and an informative error message of sorts when not writing valid json, instead of just having it erased. But i figured it out, and i’m very happy with the plugin.
13 octobre 2023
HI! How can i add this example:@tailwind base; @tailwind components; @tailwind utilities; @layer base { h1 { @apply text-2xl; } h2 { @apply text-xl; }}
Lire les 13 avis

Contributeurs/contributrices & développeurs/développeuses

« TailPress – Tailwind for WordPress » est un logiciel libre. Les personnes suivantes ont contribué à cette extension.

Contributeurs

“TailPress – Tailwind for WordPress” a été traduit dans 2 locales. Remerciez l’équipe de traduction pour ses contributions.

Traduisez « TailPress – Tailwind for WordPress » dans votre langue.

Le développement vous intéresse ?

Parcourir le code, consulter le SVN dépôt, ou s’inscrire au journal de développement par RSS.

Journal

0.4.4

  • Removed Hashing from Twind config
  • Better autoload with DIR

0.4.3

  • Compatibility with PHP 7.0

0.4.1

  • Fixed syntax error in Twind init
  • Upgraded Twind CDN library to 1.0.8

0.4.0

  • Added a cleanup plugin data option
  • Better JSON editor
  • Clear the cache when config is updated.

0.3.2

  • Updated Twind script not to include presets

0.3.1

  • Fixed trailing comma in function for better PHP support

0.3.0

  • Added a clear cache button.
  • Use a remote service for compiling CSS.
  • Added disclaimer about tailpress.io

0.2.0

  • Added a settings page to configure Tailwind.

0.1.2

  • Fixed interferance in admin panel

0.1.1

  • Fixed buffer notice

0.1.0

  • First version.