Changing Foundation CSS for Tailwind #8932
Replies: 2 comments 18 replies
-
I am against Tailwind. I am not against changing the underlying CSS framework. While I understand the popularity of Tailwind, I am a strong supporter of the standards and to me Tailwind is trying to eliminate writing CSS, getting rid of one part that controls how things look and instead dictate it in the markup. The HTML becomes cluttered with different classes and each representation of the same element can look different depending on the classes that were added there and has to be maintained over all the modules and apps that implement the same elements. To me it sounds similar what we did in the "ancient times" with I would much rather see a standardized approach to the UI where e.g. a The webpacker migration has made a bad impression that CSS is bad. It doesn't have to be that way. |
Beta Was this translation helpful? Give feedback.
-
Thanks for sharing @andreslucena !
To me Tailwind can be great, if we define some clear boundaries. No objections my side to go with it. Coming from React, I consider HTML+CSS as a unique concern: displaying things. As decidim has a lots of "things", standardized "<choose your lib>" is a must, I think. |
Beta Was this translation helpful? Give feedback.
-
Together, Product and Populate (in charge of the current redesign) have been talking internally about the possibility of changing the CSS framework, and evaluating Tailwind as the new option.
Arguments in favor of Tailwind and/or changing to a new framework
bg-gradient-to-r from-cyan-500 to-blue-500
)Arguments against changing (to Tailwind or any other)
The main argument for not changing CSS framework is backwards compatibility. Changing the CSS framework means rewriting lots of HTML to make use of new classes. We see two areas regarding this:
"Default" redesign
Given that so many things are going to change, the cost of starting from scratch will be lower than reusing the current markup. This difference might be significant, since some elements that now share markup are going to have a different design (i.e., cards of different components that now share code, in the future won't, probably). We would take this opportunity to streamline and modernize the markup where needed.
In conclusion: keeping the current markup to guarantee backwards compatibility imposes a cost, with few or no advantages (actually the contrary, since using Tailwind gives us many). Also, the new design brings new elements or substantial changes in key elements (navigation, proposals...), so even if we maintain some current classes, many will be new.
Already customized sites with lots of changes
If you have a Decidim with no HTML customization, the upgrade will be seamless. If, on the other hand, you have customized your HTML, you'll be forced to rewrite your HTML to upgrade. This will impose a cost to those installations which might be significant.
But, given the changes that the redesign is going to bring, highly-modified installations will have whatsoever a cost to upgrade their designs to the new design even if we maintain some classes.
Our conclusion
In our view, given the advantages we anticipate for the change, and the fact that highly-modified installations will have to invest to adapt to the upgrade in any case, we consider the change to Tailwind as the best option that will improve developer experience and ease of customization.
Beta Was this translation helpful? Give feedback.
All reactions