SASS: Only properties may be nested in properties. Why?

前端 未结 1 1841
野的像风
野的像风 2020-12-21 04:18

I have the following SASS script, but PhpStorm says it\'s \"Ilegal nesting: Only properties may be nested beneath properties.\" What\'s wrong with nesting element stylings?

相关标签:
1条回答
  • 2020-12-21 05:07

    Sass syntax is extremely strict regarding indentation. You must be consistent.

    $blueish: blue
    
    header
    
      nav
        float: left
    
        ul // this was indented too far
          list-style: none
          margin: 0
    
          li
            float: left
            margin: 2px 5px
    
            a
              color: $blueish
              font-size: 0.8rem
    
    0 讨论(0)
提交回复
热议问题