tailwindlabs / tailwindcss-forms

A plugin that provides a basic reset for form styles that makes form elements easy to override with utilities.
https://tailwindcss-forms.vercel.app
MIT License
4.24k stars 224 forks source link

[Bug]: Tailwind config 'prefix' not supported with strategy: "class" #69

Closed Jimmy89 closed 3 years ago

Jimmy89 commented 3 years ago

What version of @tailwindcss/forms are you using?

2.1.1

What version of Node.js are you using?

v12.20.0

What browser are you using?

N/A

What operating system are you using?

Fedora

Reproduction repository

https://play.tailwindcss.com/9WTYxDJPb3

Describe your issue

When both prefix from TailwindCSS and strategy: 'class' from this plugin are being used together the classes from the forms plugin do not get the prefix attached to them. As example the form-input class should be tw-form-input with the following tailwind config file:

module.exports = {
  prefix: 'tw-',
  plugins: [
    require('@tailwindcss/forms')({
      strategy: 'class',
    }),
  ],
}

However, the class remains form-input which is not expected.

Jimmy89 commented 3 years ago

Duplicate of #64, sorry for not spotting that sooner.