Looking at various JS frameworks (Dojo, Ext.JS, and others) i have observed that layouting is often, if not always, done via direct DOM manipulation, as in setting inline styles on a given DOM element/s.
This contrasts starkly with what CSS tries to aim, and it appears to me that often CSS is only left to “prettify” such scenarios, dictating colors and the like.
I would like to understand why this choice has been made, perhaps even from a historical point of view, and your choice of CSS or inline styling for the layout part of a page/webapplication.
In what case would you be comfortable using ONLY CSS via a stylesheet without using js dom manipulation?
What case would speak for the opposite?
Thanks!
Because they use math to position things for the most part and CSS Calc isn’t well supported.
For example in jQuery UI they use math to figure out where a dialog box should go on the screen or how to split columns up.
CSS is catching up with things like Flexbox and Calc, but the JS frameworks you mentioned often support very old browsers like IE6 which won’t EVER be getting these CSS updates.