outofcontrol, (edited )
@outofcontrol@phpc.social avatar

Reading ‘Why Tailwind CSS Won’ and was caught off-guard by this comment from Matt Rickard “few developers are writing HTML (instead, they are writing JSX or TSX).” What do you write mostly?

lazyq2,

@outofcontrol I think it's an awkward comment when most of the internet runs on Wordpress (PHP). Not everyone is running Node.js or Next.js, and even those that are... Next.js supports CSS modules which are better than tailwind and solves the same problems tailwind purports to solve, so I just don't get it.

anders,
@anders@mastodon.cyborch.com avatar

@outofcontrol I'm mostly doing .tsx (or recently more .svelte), but I still prefer plain CSS over Tailwind any day.

Tailwind is aggressively unreadable.

outofcontrol,
@outofcontrol@phpc.social avatar

@anders Used to a be an advocate for Bootstrap & home-grown CSS. Now into Tailwind. The clutter and difficulty in maintaining consistent styles bothers me a fair bit, but the good bits out-weight this. HTML snippets in template engines like Twig & Blade make it easier to maintain consistency. All my projects get a small set predefined CSS for things like buttons and links, but the rest is just Tailwind. Still writing CSS for some older projects, and enjoying that as well.

anders,
@anders@mastodon.cyborch.com avatar

@outofcontrol I would recommend something like https://styled-components.com which gives you the best of both worlds (imho). You get to style each individual component without having to worry about class clashes, and you can still use plain CSS selectors, so people can actually read what the styles do without having to decode tailwind.

outofcontrol,
@outofcontrol@phpc.social avatar

@anders I guess if you use JS perhaps?

wbrowar,
@wbrowar@hachyderm.io avatar

@outofcontrol I think it depends on what you mean by writing HTML. Technically I haven’t written HTML without some sort of templating language (Twig, Vue SFC templates, etc..) in years, but I would consider what I’m writing to be HTML (with dynamic parts injected into it).

outofcontrol,
@outofcontrol@phpc.social avatar

@wbrowar IMO templates, if mostly HTML, it is writing HTML. Not familiar with Vue SFC templates, but I am familiar with Twig, Blade, EE and Still have one site using Smarty…

wbrowar,
@wbrowar@hachyderm.io avatar

@outofcontrol I read that article, too, and I can see the logic behind suggesting most people use JSX these days, based on how popular React is as a front-end framework (assuming most people think of JSX/TSX as the main way to write React components).

But I also think that Matt is making a big assumption in this case.

outofcontrol,
@outofcontrol@phpc.social avatar

@wbrowar Pretty much a stand-alone dev over here in my dark dungeon of an office… and I’ve not seen statistics on how many people write in which language, so Matt could be correct. But my gut feeling is, yes, this seems like a big assumption. Open to being set straight by the internet. 🙃

wbrowar,
@wbrowar@hachyderm.io avatar

@outofcontrol same here!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • webdev
  • DreamBathrooms
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • GTA5RPClips
  • JUstTest
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • provamag3
  • Leos
  • cisconetworking
  • megavids
  • lostlight
  • All magazines