简体   繁体   English

在内部使用 SASS/SCSS 语法<style> tag

[英]Using SASS/SCSS syntax inside <style> tag

Is it possible/allowed to use SASS/SCSS syntax inside .html file in tag?是否可以/允许在标签中的 .html 文件中使用 SASS/SCSS 语法? I'd like to define a variable inside .html file and than use it inside .sass file.我想在 .html 文件中定义一个变量,而不是在 .sass 文件中使用它。

简单地说,,SASS 是一个 CSS 预处理器——如果你正在考虑在你的 CSS 中实现变量,一种方法可能是简单地将变量直接应用于文档head的类——只要它包含在你的页面中在您的 SCSS 输出之后,它将覆盖该 CSS 样式的任何其他设置。

Not inside normal HTML ..不在普通的 HTML 中..

I use it inside Vue template, with installed sass as following:我在 Vue 模板中使用它,安装的 sass 如下:

<style lang="scss">
    /* SCSS here ._. */
</style>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM