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

It's ridiculous to me to read that for some people it is desired to have CSS, JS, and HTML in the same file. I would never consider it an improvement.


That’s an interesting opinion as react, Vue, svelte are all in favour of having css and templates together with js. What do you prefer?

IIRC, Vue allows you to move link to a separate html,css and js file from vue sfc file should you want it


You are right, I prefer exactly this - to separate CSS, HTML, and JS/TS.

I know that “smaller components are better”, I agree with this rule, but I prefer to draw the boundaries myself, not forced by the capabilities of my code editor.


It's one of the things I love about svelte. Obviously global styles live in a separate place, but having scoped JS/CSS alongside the HTML its related to is a godsend, especially as a project grows.




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

Search: