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.15k stars 219 forks source link

input type="checkbox" { @apply rounded-full; } leaving syntax error expecting { instead of = #128

Closed Ernestopheles closed 1 year ago

Ernestopheles commented 1 year ago

What version of @tailwindcss/forms are you using?

3.2.2

What version of Node.js are you using?

16.14.0

What browser are you using?

brave

What operating system are you using?

kubuntu

Reproduction repository

https://github.com/Ernestopheles/tailwind-p

Describe your issue

After installimg the forms plugin it seems to work as I can see on the website. But this will leave a syntax error:

/** Formulare **/
input  type="checkbox"  {
  @apply rounded-full;
}

requesting a { after type

thecrypticace commented 1 year ago

This is because it's invalid CSS. You need to use the CSS attribute syntax which uses [ and ].

So you should write it like this:

input[type="checkbox"] {
  @apply rounded-full;
}