3 ms·
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.
by EugeneOZ 4y ago
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.
- rk06 4y agoThat’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
- EugeneOZ 4y agoYou 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.
- dbrueck 4y agoIt'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.