在< style>中使用SASS / SCSS语法标签 [英] Using SASS/SCSS syntax inside <style> tag

查看:406
本文介绍了在< style>中使用SASS / SCSS语法标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以/允许在标记中的.html文件内使用SASS / SCSS语法?我想在.html文件中定义一个变量,而不是在.sass文件中使用它。

Is it possible/allowed to use SASS/SCSS syntax inside .html file in tag? I'd like to define a variable inside .html file and than use it inside .sass file.

推荐答案

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

Simply put, No, SASS is a CSS preprocessor- if you're looking at implementing variables into your CSS, one way may be to simply apply the variable directly to a class in your document head- as long as it is included in your page after your SCSS output, it will overwrite any other setting for that CSS style.

这篇关于在< style>中使用SASS / SCSS语法标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆