Comments (3)
It's not really that it's ignored, just that we don't have to do anything special to make disabled states styleable. This plugin isn't designed to make forms automatically look good or anything, just make them work more easily with utilities. How you want things to look when they are disabled is hard to generalize, the styles would be different in each project.
The recommended approaches to styling disabled form elements are either:
-
Just add utilities whenever you add the disabled attribute, usually with JS. Might look something like this:
<input className={`... ${formDisabled ? 'opacity-50' : ''}`} disabled={formDisabled} />
-
Use Tailwind's
disabled
variant (not enabled in Tailwind by default)<input class="... disabled:opacity-50" disabled />
No plans to add disabled styles by default as I think that would actually make it harder for people to use custom disabled styles, since they would be forced to enable the disabled
variant to defeat the default disabled styles. Hope that makes sense.
from tailwindcss-forms.
Thank you for your insights. I didn't know if it was intentional or not, but now that you've told me the reasoning behind it I totally understand.
from tailwindcss-forms.
I can look into making a PR
please
from tailwindcss-forms.
Related Issues (20)
- CSS color-adjust property is deprecated
- Invalid padding for <select> in Firefox HOT 1
- No longer works with @nuxtjs/tailwindcss - 5.1.2 HOT 1
- "MODULE_NOT_FOUND" if tailwind config is in another directory HOT 3
- Tailwindcss/forms failed to install HOT 2
- input should always default to [type='text'] styling. HOT 4
- input type="checkbox" { @apply rounded-full; } leaving syntax error expecting { instead of = HOT 1
- input [type="checkbox"] { @apply rounded-full; } does not work HOT 1
- Placeholder color not compatible with css variables HOT 3
- Adding the plugin breaks TailwindCSS extension in VSCode on macOS HOT 1
- Tailwindcss/forms and other plugin compatibility issue (DaisyUI) HOT 2
- Select with size option shows chevron HOT 4
- Outdated installation instructions HOT 1
- next.js | Error: Cannot find module '@tailwindcss/forms' HOT 1
- Disable tailwindcss-forms for a specific form HOT 2
- appearance-none not working for select tag
- Select input options in Chrome not displaying properly HOT 4
- 'require' not define, cannot import plugin to tailwind config HOT 3
- How to remove the caret in the select input? HOT 1
- Date length error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tailwindcss-forms.