1.0.1 • Published 1 year ago

@stefanracic/tailwind-classvariants v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

tailwind-child

A simple TailwindCSS plugin that helps you to register class variants and change styles with simple class toggle on a parent node.

<body class="contrast">
  <a href="" class="text-gray-500 cst:text-black">
    READ MORE
  </a>
</body>
module.exports = {
  content: [],
  theme: {
    extend: {
      classVariants: {
        // variant: "toggleableClass"
        contrast: "contrast",

        // Can be different if necessary
        cst: "contrast"
      }
    },
  },
  plugins: [
    [
      require("@stefanracic/tailwind-classvariants")
    ]
  ],
}