Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

CSS preprocessors are fine. Processors only understand binary but noone programs in binary today. If CSS become the binary of tomorrow, it's fine.

Inlining CSS is stupid, it makes your page bigger, less flexible, doesn't use browser caching technics, and didn't solve the problem at all (or make it worse...).

CSS with Javascript is even worse, as it will be slow as fuck, hard to maintain, and equivalent to directly write CSS by hand anyway.

flex-boxes, box-model, table display, and more... solve most of problems you will ever had.



So many wrong statements.

The performance differences, between CSS styles applied from a JS file and a CSS file are very small on modern browsers, with JS being faster sometime.

JS files are cached.

Preprocessors are not fine, they complicate and slow down the development process.

Inlining CSS is not stupid, OP discusses the numerous advantages it brings...


> The performance differences, between CSS styles applied from a JS file and a CSS file are very small on modern browsers, with JS being faster sometime.

False, JS have to be interpreted and you have issue with document not being fully loaded. And CSS is easy to parse, faster to parse and "run" than JS. No, saying that JS is faster than CSS is just false.

> JS files are cached.

CSS too, and even can be prerendered. And CSS works when JS is disabled.

> Preprocessors are not fine, they complicate and slow down the development process.

That's not an argument at all because with the right tool its just like using a compiler. See "make" for example. Also you have to see how much you gain with the preprocessor, maybe loosing 0.01ms per "make" is worse it since you write code 1.2 times faster...

> Inlining CSS is not stupid, OP discusses the numerous advantages it brings...

And do not highlight the obvious disadvantages.


You have NO idea what you're talking about.

>> JS have to be interpreted

Yeah, because the Bible, the Quaran and the Declaration of Independence say so ...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: