SASS, on first impression, seems to be a C-preprocessor-style tool for various code smells (like lots of copying and pasting) that come with production CSS.

I was explaining SASS as being like C's preprocessor, and that raised a question. The C preprocessor has some very good uses: defining constants, perhaps, or including header files. But there are also certain things that are "considered harmful", in particular using the preprocessor as a tool to do the work of a function whilst sidestepping the overhead of using a function. The preprocessor has an important place, but if you have a choice between implementing something via preprocessor macros and implementing it as a function, chances are you should be using a function, not the preprocessor.

Are there any gotchas like that for using SASS?

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top