Sass mappings and indented syntax

后端 未结 2 523
误落风尘
误落风尘 2020-12-06 01:45

Is there a way to indent Sass\' 3.3 mappings?

In scss we can write following:

$colors: (
  header: #b06,
  text: #334,
  footer: #666777
)

2条回答
  •  粉色の甜心
    2020-12-06 01:49

    There is number of issues with the indented syntax in SASS.

    Unfortunately SASS syntax doesn't support Multi-line. Reading the documentation, there is only one exception, when it comes to multiple CSS selectors like in this example:

    .users #userTab,
    .posts #postTab
        width: 100px
        height: 30px
    

    Read the complete documentation here:

    http://sass-lang.com/docs/yardoc/file.INDENTED_SYNTAX.html#multiline_selectors

    So, there is no possibility to get multi-line support for an argument list in SASS.

提交回复
热议问题