Re:TailwindCSS JIT with arbitrary values
by davzie on Wednesday April 07, 2021 @04:19PM
(#26730620)
I was once a massive Tailwind hater. I remember walking around Ipswich with a close friend who is also a developer proverbially slagging it off and all those that espoused it as the next best thing since sliced bread. Then I actually thought “well I’d better jump on this bandwagon before I’m unemployable”. I’ve never been able to build stuff so fast. I’m absolutely floored by the small learning curve and the speed at which I can put things together, especially with the help of TailwindUI too. There’s something huge to be said about the fact that I don’t need to context switch to CSS-land out of my markup to style up what I’m doing. I didn’t realise it, but that overhead of switching to a style sheet and going back to modify markup and then viewing the results in the browser really just used up my mental energy battery. Now, if I was in prison with Adam Wathan and Steve S, I’d 100% protect them in the showers if they dropped the soap.
[ Parent
| on HN ]
Re:TailwindCSS JIT with arbitrary values
by hardwaregeek on Wednesday April 07, 2021 @04:50PM
(#26731067)
That's...the most interesting way I've seen of saying you like someone's work.
It's all fun and games until you're in the prison shower with a bunch of Bootstrap goons
Can we please add this prison testimonial to the tailwind website?
Re:TailwindCSS JIT with arbitrary values
by b0afc375b5 on Thursday April 08, 2021 @12:15AM
(#26735022)
This is the most eloquent way I've read someone praise someone else's work so far.
> There’s something huge to be said about the fact that I don’t need to context switch to CSS-land out of my markup to style up what I’m doing. I didn’t realise it, but that overhead of switching to a style sheet and going back to modify markup and then viewing the results in the browser really just used up my mental energy battery.
Welcome to what us React folk have been saying since at least 2016. Splitting your code by language is bad. Vertical slices for the win.
Re:TailwindCSS JIT with arbitrary values
by benatkin on Wednesday April 07, 2021 @06:24PM
(#26732256)
Agree. Vue and Svelte get this right as well (assuming you use SFCs properly), except they don't have bizarre preferences for one-way data binding everywhere or typing className instead of class.
Re:TailwindCSS JIT with arbitrary values
by runarberg on Wednesday April 07, 2021 @06:32PM
(#26732338)
Agree with this. Although I’m gonna say it is not the single file per-se which is the winning technology here but the component scoped styles. When writing vanilla web components this can be accomplished with `this.attachShadow()`, and in Stencil you write an external stylesheet and reference it with a `styleUrl` in your `@Component` decorator.
In fact it is kind of nice to put your styles in another file if you have a designer on your team who is afraid to touch any files that don’t have the `.css` extension.
Re:TailwindCSS JIT with arbitrary values
by aabbcc1241 on Wednesday April 07, 2021 @08:46PM
(#26733674)
Elm also approaches this way, with type-safe checking.
Re:TailwindCSS JIT with arbitrary values
by tiborsaas on Thursday April 08, 2021 @03:57AM
(#26736195)
I still dislike CSS in JS solutions and classname soup.
- A fellow React folk.
Re:TailwindCSS JIT with arbitrary values
by dasil003 on Wednesday April 07, 2021 @06:24PM
(#26732266)
I love how quickly you went from publicly denouncing Tailwind to panicking that you would be left behind and jumping on the bandwagon. I'm imagining this psychological drama playing out within the gap between two spoken sentences to your friend and it's hilarious.
I completely agree with your points on mental energy expenditure and speed of development. I thought it was a bad idea, but I’m now 3 months deep into a big project using it and I will never go back.
Re:TailwindCSS JIT with arbitrary values
by Ashanmaril on Wednesday April 07, 2021 @04:59PM
(#26731186)
It's also very nice when you're moving some markup from one file to another and not having to worry about where certain styles are coming from and copying those over too
Re:TailwindCSS JIT with arbitrary values
by zoover2020 on Wednesday April 07, 2021 @04:44PM
(#26730980)
Exactly my experience, haters gonna hate... For CSS, I'd argue it _is_ the best thing since sliced bread
Re:TailwindCSS JIT with arbitrary values
by runarberg on Wednesday April 07, 2021 @05:56PM
(#26731909)
> Now, if I was in prison with Adam Wathan and Steve S, I’d 100% protect them in the showers if they dropped the soap.
Sorry to go on a tangent here with a commentary unrelated to the discussion at hand (which is indeed an interesting one), but can we please stop with the rape jokes. They are not funny, and may be triggering to a large portion of your readers.
Re:TailwindCSS JIT with arbitrary values
by cloogshicer on Wednesday April 07, 2021 @06:07PM
(#26732036)
Agreed, good thing you pointed this out. Here's a really good video that discusses this issue: https://www.youtube.com/watch?v=uc6QxD2_yQw
Re:TailwindCSS JIT with arbitrary values
by Kaze404 on Wednesday April 07, 2021 @10:43PM
(#26734517)
I'm glad someone said this before I did. Male sexual harassment has been so normalized in media over the years that we can barely recognize it in the wild. As a man who has dealt with sexual harassment before, I feel like we should talk about it more.
Re:TailwindCSS JIT with arbitrary values
by lurker3901 on Wednesday April 07, 2021 @10:46PM
(#26734529)
thanks for going on a tangent about something unrelated then /s
I said I’d protect them !