found drama

get oblique

thoughts on that “Do We Need CSS Anymore?” post going around

by !undefined

Re: Chris Coyier’s The Debate Around “Do We Even Need CSS Anymore?” post:

As with just about all approaches in software, there’s no one-size-fits-all solution, and for any given development team, they’ll need to come to their own conclusions about the trade-offs. Personally, I think the “do it all in JavaScript” approach seems like a short-sighted optimization. From the component-based perspectives like we’re seeing with React, I can see why you’d want to bundle style changes to the components — but my gut says this is a slippery slope that prioritizes developer ergonomics over all other concerns.

Consider battery performance on mobile, for example — I’d put even money that mobile browsers have been tuned for CSS performance with respect to power consumption, but there’s probably a lot more overhead in managing JavaScript changes and then having to repaint with all those low-level styles applied at the element level.1

Keith J. Grant’s “stop pretending” point is a legitimate claim, and regardless of which of the big front-end frameworks you’re a fan of, you’ll find that they’ve all embraced some flavor of this by now.2 However, I remain skeptical of the wisdom to put all the eggs in that particular basket. I still see a lot of value in keeping these concerns separated… to the extent that you can separate them at all.

  1. To be fair: this is a hunch, and I have no data to back this up, nor have I been able to find any in my admittedly brief and shallow search. []
  2. We’ve already called out React by name here. And say what you will about the AngularJS approach of sticking directive hooks into the mark-up as attributes, but that’s evidence of embracing the approach. And let’s not forget Tom Dale’s 2013 expose on progressive enhancement — and/but/so by extension we know where Ember lands on this question as well. []

About !undefined

Syndicated content from the !undefined Tumblr blog where Rob Friesel posts items related to software engineering, user interface/experience design, and Agile software development. Lots of JavaScript here. View all posts by !undefined →

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*