DEV Community

Cover image for Top 5 DEV Comments from the Past Week
Peter Kim Frank Subscriber for The DEV Team

Posted on

Top 5 DEV Comments from the Past Week

This is a weekly roundup of awesome DEV comments that you may have missed. You are welcome and encouraged to boost posts and comments yourself using the #bestofdev tag.

@steveblue kicked off a great "battlestations" with their submissions to Workspace Wednesday: Show me pics of your at-home setup:

Rocking this setup during self quarantine!

@twigman08 adds their thoughts about the state of things in: In defense of the modern web:

Honestly my biggest issue with the current state of the web is the current state of how complex the tools or build process is.

I miss the days of some html, add a bit of JavaScript to the page and you were done. You didn't worry about going and making sure you had a complete build or bundling process to get everything good. You spent your time worrying about how to develop your app. Which in my opinion was better for the users. There was less bugs. We actually spent more time making sure the application worked rock solid.

Nowadays to get anything cool to be be ready for production you have spend needless time on the configuration. Did you do this? Did you configure it to do that? Oh you can't do that unless you eject it that build tool and use this build tool. That's where the current state of the web is failing.

Sure we have taken steps forward in some areas. But we have to be honest with ourselves. We took major steps back in other areas of the web. Sometimes I wonder if we took too many steps back.

@foresthoffman let fly with their take in What is your pettiest programming-related opinion?:

This gonna be good GIF

WordPress is an over-complicated and out-dated framework that shouldn't be used for anything more complex than a plain-text blog.

@gmopalafox quipped about ridiculous years-of-experience requirements in Learn Deno: Chat app:

Very soon... "We need a deno dev with at least 5 years of experience"

@mtpiercey shared their thoughts in Is the Tailwind approach a big step forward for CSS or just-yet-another-thing?:

Here's my two cents (rounded to a nickel since Canadian pennies are no more...):

Tailwind is super useful as opposed to a lot of other frameworks, IMO, because it doesn't have a pre-determined philosophy. Bootstrap/Foundation/Bulma/Materialize/Vuetify & co. say "this is a button" or "this is a navigation drawer."

That kind of paradigm is useful when you don't have those ideas floating around in your head already, or you like the way they do it. But what if you want to change the margins, padding, font size, or what have you of one of those components? I'm working with Vuetify right now, and I can say first-hand that that annoyingly means a lot of !importants in my CSS...

Tailwind (other than the new Tailwind UI, which looks intriguing) is basically just like writing CSS, except most of the normal/mundane things have an easy class (that doesn't come with any side-effects, baggage, or other styles). Want to have a button get bigger on hover? Add transform hover:scale-105 to the classes. Boom. Done.

But it doesn't replace CSS, in my opinion. There are some things you just can't break down into reusable classes like that. Like animations, or custom media queries (though Tailwind does come with an ample amount of customization for the latter), or - dare I say - some kind of browser hack to fix that annoying little glitch that happens to the hover styles on last year's version of Chrome...

To me, SASS is the future of CSS, but Tailwind means you can write less Sass, especially for reusable things.

Though, it has its limits. One is fairly obvious; you're still writing a whole bunch of styles, just not in the style block, but right in the HTML. You can easily get a class list that takes up several lines, or trails off beyond the horizon of your editor like a minified, inline SVG. Tailwind does use the @apply directive of Sass to apply a lot of stuff as mixins, so that can be avoided to some extent.

The other, of course, as already mentioned by my fellow commenters, is that you really need PurgeCSS or something like it when you're using Tailwind. It just adds a bunch of mostly-unused bloat to your bundle size otherwise (to the tune of a few hundred kilos, if you aren't careful - and even sometimes if you are). And, at least for me, Purge is almost more trouble than it's worth. Almost.

Bottom line here is that it isn't a magic bullet. It solves a ton of problems, but it introduces a ton of potential challenges. At the end of the day, you can't really beat proper modularization (via Sass or scoped styles in Vue components or what have you, perhaps) of styles and class naming conventions that make sense. Tailwind brings a lot to the table, sure, but it really brings a lot (by way of overhead and build process shenanigans). It ain't magic, folks (but if you like it, you'll really like it).

See you next week for more great comments ✌

Top comments (2)

Collapse
 
peter profile image
Peter Kim Frank

Congrats to @steveblue , @twigman08 , @foresthoffman , @gmopalafox , and @mtpiercey for making the list this week!

Collapse
 
tienquanutc profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Nguyễn Tiến Quân

2313

Some comments may only be visible to logged-in visitors. Sign in to view all comments.