SASS中有多行吗? [英] Is there a multiline in SASS?

查看:99
本文介绍了SASS中有多行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法从SASS文档中了解到这一点.例如,我想将Compass mixin与5个参数一起使用:

I couldn't figure out that from SASS documentation. For example I would like to use Compass mixin with 5 parameters:

=link-colors(!normal, !hover = false, !active = false, !visited = false, !focus = false)

我想用语义上可理解的名称声明5个常量:

I would like to declare 5 constants with semantically understandable names like those:

!top_line_navigation_link_normal_color = #00c
!top_line_navigation_link_hover_color = #0cc
!top_line_navigation_link_active_color = #c0c
!top_line_navigation_link_visited_color = #ccc
!top_line_navigation_link_focus_color = #cc0

然后在下面的某个地方将罗盘mixin添加到我的mixin中:

and then somewhere below add compass mixin to my mixin:

+link-colors(!top_line_navigation_link_normal_color, !top_line_navigation_link_hover_color, !top_line_navigation_link_active_color, !top_line_navigation_link_visited_color, !top_line_navigation_link_focus_color)

这条线太长了.我对这个问题不是很认真.但是可以制作多行吗? :)

The line is long too much. I'm not very serious with this question. But is it possible to make multiline? :)

推荐答案

否,Sass不支持多行语句(

No, Sass does not support multiline statements (https://github.com/sass/sass/issues/216). But the new SCSS syntax in Sass3 does because it is whitespace agnostic, just like CSS.

这篇关于SASS中有多行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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