Are there any browser layout engines which interpret SASS natively (without CSS) or plugins which enable this?

前端 未结 1 817
傲寒
傲寒 2021-01-16 08:06

Imagine a site made of just of HTML + SASS files, but displaying in a browser just like HTML + CSS. Essentially, skipping the step of compiling the SASS to CSS first. Is the

相关标签:
1条回答
  • 2021-01-16 08:39

    No, but there is work being done to move ideas from Sass/Less into standardized CSS. Contrary to the comments above, there are very good reasons to do the calculation on the client side. Browsers would be able to access the actual DOM, to do more informed calculations. Need to add percentages to pixels? Pre-processors can't do that, but a browser could.

    In fact, that's the reason you don't want Sass to be implemented in a browser directly. Sass is awesome, but if browsers are implementing similar features, they should take those ideas even further by integrating with the DOM. That's happening now with variables and simple calculations. Can't wait for more!

    0 讨论(0)
提交回复
热议问题