Re:Tailwind CSS: From Side-Project Byproduct to Multi-Millio...
by ec109685 on Monday August 03, 2020 @12:03PM
(#24039451)
In practice with a similar approach, we have seen when design changes, you end up having bits of your site looking old indefinitely. You can tell the “era” a page was built based its design choices. Not good.
Re:Tailwind CSS: From Side-Project Byproduct to Multi-Millio...
by andrei_says_ on Monday August 03, 2020 @12:17PM
(#24039651)
both 1 and 2 are trivial in scss using presets for colors, spacing, font sizes.
margin-top: margins(xl);
Re:Tailwind CSS: From Side-Project Byproduct to Multi-Millio...
by kilburn on Wednesday August 05, 2020 @02:30AM
(#24057866)
True, but this also misses part of the point:
- Once you are in the "margin-top: xxx" part, nothing prevents you from saying "just this time" and writing some px (or whatever) value, either because you don't remember the options at your disposal, because none of them feel exactly right or whatever. Using tailwind you would have to create an entirely new size definition, which is a big hassle. That is, using scss does not actively push you to this particular "pit of success" whereas using tailwind does.
- Responsive handling is much more verbose in scss. Consider "sm:mt-2" versus "@include responsive(sm) { margin-top: margins(2) }"
(1) You have to think less. Try "margin-top medium", look at the result, "oh it's too much", try "margin-top small", look at the result, ok fine. No px-fiddling.
(2) It produces more consistent results (i.e.: things tend to look nicer).
What doesn't win me is that, while I see the increase in development speed this brings, I don't see how would you handle maintainability (i.e.: what happens when the design needs to change?). I suspect the trade-off here is that you just renounce to such redesigns and commit to the idea that you'll rebuild the entire thing if/when the time comes (tech advances so quickly in this space that you may want to do it anyway).