Ask HN: What do you think of the anti-CSS debate?
I've been hearing more and more about the concept of applying inline styles through JavaScript as opposed to using CSS. There's been an article floating around regarding the idea, too (https://css-tricks.com/the-debate-around-do-we-even-need-css-anymore/). What's your take?
8 comments
[ 2.6 ms ] story [ 24.4 ms ] threadI am also idly wondering how this would all work out in "HTML and CSS as s-expressions" à la Ŝablono https://github.com/r0man/sablono
He is saying that you would have a 'style.js' performing the task, but he is not specifying exactly how that file would replace the 'style.css'. A designer writing the 'style.js' key-value pair seems implausible as does converting a designer-created 'style.css' to 'style.js'.
Case study: If trying to manipulate some ~100 inline-block elements into a grid, with dynamic (say, zoomable + pannable + screen size dependant) width, height and offset. It makes way more sense to programmatically modify the stylesheet using the CSSOM API with fast calculated values, rather than applying unique styles to each of those 100 elements in the DOM, O(1) vs O(n) - yes?