Hacker News new | ask | show | jobs
by The5thElephant 3061 days ago
And all of that works just fine with CSS. CSS has problems, but more to do with scoping or lack of a grid-based layout system (until now).

When I see devs saying "Just do it all in Javascript" I have to assume they aren't actually that familiar with CSS. First off Javascript simply manipulates CSS properties anyway when it comes to styling, and writing a system that completely ignores CSS and renders its own way is far more complex without any clear benefit.

2 comments

I think you misunderstood my response, in what you were replying to I was just pointing out web pages are not static documents. I in no way intend to suggest that JavaScript can solve all of the problems with CSS, and also don't agree that the grid system will help much. IMHO the biggest thing missing from the CSS/HTML/JavaScript system is the ability to determine how much space is required to display certain text or elements, vs how much space is available to display them, and the ability to make decisions based on that (recursively) on how other elements are displayed.
Yeah. And then you actually want to create a layout that can display images properly, and you’re screwed.

There’s a reason all the “powerful CSS layouts” are all poor re-iterations of printed pages. Once you want actual layout, you end up carefully positioning everything with Javascript.

And by actual layout I mean things like Sencha (easily half of which still cannot be implemented in CSS without)