-
Notifications
You must be signed in to change notification settings - Fork 41
curious: what about applying classes in devtools? #49
Comments
it would be nice to have this discussion here not on twitter... |
Sorry for linking to an answer to the question, I guess. |
that's a comment for the tailwind team but you are free to take it personally 🤷♂️ ... |
Again, I am sorry for contributing to the discussion. My mistake. |
Nothing to be sorry about. Anything that's helpful to the discussion in welcomed. Thanks for the link. |
Hey thank you so much for the kind words! 😍 Yeah this is a tricky one and just kinda one of the trade-offs that comes with this approach. I've thought a little bit about somehow pregenerating a subset of styles to get the best of both worlds in development but it's very difficult to know what to generate. Do you generate every utility, but just not the variant versions? Since I expect most people aren't typing I'm going to close just because no immediate plans to action this but it's not something I am totally dismissing either. For now it's just something we need to accept as a trade-off. In the mean time I would suggest trying to build a habit of making your changes in your text editor with a live reload/HMR setup in place instead and see if that's actually all you need. |
Yes, I also think generating for each variant would be too much granular. I used the [responsive] as an example. But figuring out what to pregenerate for everyone's use case could be hard & could easily go up to at-least 1mb file size of most common utilities. Letting people choose what to pregenerate temporarily with a little comment would be a great feature I think. Like And I use live reload/HMR already as I mostly use react or vue. Btw thanks for your attention. Hope you come up with something soon. |
I find this trade-off interesting because one of the biggest selling points of tailwind was not to context switch between html and css files, and use a limited DSL instead of pure css. This new modus operandi now introduces such a context switch between the browser and the editor to do the "quick" prototyping -- which now becomes "writing pure css" that needs to be translated back into tailwind's DSL: the circle is complete. Maybe a browser extension is the way forward? |
I'm not sure. It might be a good idea. I don't have much experience with building extensions, still I'm thinking of giving it a shot and see if it's feasible. |
Uh oh!
There was an error while loading. Please reload this page.
First of all excellent effort! 🎉 only I know how many times my PC hanged/stopped working when working in devtools 🔥 . JIT is blazing fast 🚀 .
Now the new issue is, I miss the ability to apply classes on the fly in devtools. Was wondering if you guys having something related to this in your genius minds?
For now I'm just anticipating & adding a comment similar to this
/* overflow-hidden overflow-auto */
to generate the classes temporarily. It's tedious.Maybe a special comment syntax like this
/* tailwind-generate flex overflow[responsive] */
to generate all flex & overflow responsive related classes temporarily would be nice. I don't know. what's your plan?The text was updated successfully, but these errors were encountered: