Skip to content

[v4] Extend plugin (e.g. typography) config in CSS config file #15262

Answered by JulioGrajales
yy4382 asked this question in Help
Discussion options

You must be logged in to vote

Currently with the css v4 @plugin syntax the only way to customize the default class name of the typography plugin is to re-export the plugin in a separate .js file and importing your plugin in the css file:

// my-plugin.js
import typographyPlugin from '@tailwindcss/typography';

export default typographyPlugin({
  className: 'wysiwyg'
})
/* main.css */
@import "tailwindcss";

@plugin "./my-plugin.js";

Not sure if the full v4 release will support passing options to plugins directly in the css file but currently this is how it can be done.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by yy4382
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants