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

Fix typo breaking background colors on checkboxes & radio buttons #72

Closed chasegiunta closed 3 years ago

chasegiunta commented 3 years ago

Totally my fault on this one for the bad previous PR... Apologies.

Just in case anyone has reported this or similar: This typo really rears it's ugly head when using some postcss optimizations that combine style declarations (cssnano, perhaps?), thus breaking the background colors for checkboxes & radio buttons when using the class strategy.

Attempting to merge styles like this:

.form-checkbox:checked, .form-radio:checked {
    border-color: transparent;
    background-color: currentColor;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

into others like so:

.form-checkbox:checked,.form-checkbox:checked:focus,.form-checkbox:checked:hover,.form-checkbox:indeterminate,.form-checkbox:indeterminate:focus,.form-checkbox:indeterminate:hover,.form-radio:check:focus,.form-radio:checked,.form-radio:checked:hover {
    border-color: transparent;
    background-color: currentColor;
}

Completely breaking the entire rule.

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tailwindlabs/tailwindcss-forms/6Y8N2dSqkeP46pMBkNQ3vtBWmBcF
✅ Preview: https://tailwindcss-forms-git-fork-chasegiunta-master-tailwindlabs.vercel.app

adamwathan commented 3 years ago

Thanks! Tagged a new release.

chasegiunta commented 3 years ago

@alexandregiordanelli This doesn't look like the same bug. Something else is going on there.

alexandregiordanelli commented 3 years ago

@alexandregiordanelli This doesn't look like the same bug. Something else is going on there.

sorry, the tailwind doesnt detect a checkbox on prod env, I solved putting a checkbox hidden and the processor could solve it