Re:PHP in 2024
by wildrhythms on Wednesday April 10, 2024 @05:54AM
(#39988860)
The usage of the term 'step' here is in the pre-deployment development process sense. I think what this person is doing is converting SCSS to CSS on request, at runtime.
Regardless of which steo, compilation process is typically done as part of a build step, where the SCSS files are transformed into the final CSS that will be served as a bundle to the end users' application.
Web browsers can't understand SCSS natively.
To be truly extreme (performance), devs should consider tree-shaking unused CSS and JavaScript. This may require using Vite (Rolldown is in the works/Rollup) if there are no other options or it makes no sense to serve bloated resources. That's the reason, I chose Astro as I care about users, not prioritse the developers' minimalistic workflows.
I prefer Tailwind because it allows me to avoid duplicating classes (mine and vendors), which is an advantage over other approaches.
I did dogfooding in Go development.
Every human-readable programming language needs to be compiled into some sort of bytecode (opcode in PHP) and/or machine language in order to work. The question is whether a human ever needs to be aware of that step. In PHP, you generally don't. In the aforementioned setup, you don't need to be aware of SCSS compilation and minification, either. Not even if you use devtools, because the map file will point to the correct line in the original source.
If you do compiling and minifying, that's a build step.