Skip to content

MrOxMasTer/postcss-tailwindcss-multiple-classes

Repository files navigation

postcss-tailwind-multiple-classes

Defining several classes at once for one variant


CSS file support

Installation

Demonstration

Before:

.class {
	@apply mm:bg-red,text-green;
}

After:

.class {
	@apply mm:bg-red mm:text-green;
}

Installation

Installation depending on the developer

npm install --save-dev tailwindcss-multiple-classes postcss-tailwindcss-multiple-classes

Creating a function and exporting it:

// postcss.config.cjs
module.exports = {
  plugins: {
    // preferably better BEFORE tailwindcss
    "postcss-tailwindcss-multiple-classes": {
      separator: ",",
      opBracket: "", // "("
      clBracket: "", // ")"
    },
    "tailwindcss/nesting": {},
    tailwindcss: {},
    autoprefixer: {},
  },
};

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published