You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create Blocks - and use Tailwindcss for styling. The block appears with correct styling on frontend but not showing any preview styling on editor itself. Do I have to register the Tailwind styles for the editor preview?
I found a trick to include the front style in Gutenberg :
Copy the style from your app.css file to the editor.css file (with a simple configuration, an @import should be enough). In my case I use tailwind, I copy/paste the whole file with all imports.
Add the postcss-prefixwrap plugin. Use either postcss.config.js (tested) or bud.config.js (not tested). Set .editor-styles-wrapper as prefix.
Make sure that the plugin is only executed on the editor.css file : from postcss.config.js, just check if the name of the processed file contains editor.css.
Ex:
I'm trying to create Blocks - and use Tailwindcss for styling. The block appears with correct styling on frontend but not showing any preview styling on editor itself. Do I have to register the Tailwind styles for the editor preview?
I'm just using the default test block eg:
The text was updated successfully, but these errors were encountered: