[Sass]緊湊輸出方式compact

2、嵌套輸出方式compact

nav {
  ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  li { display: inline-block; }

  a {
    display: block;
    padding: 6px 12px;
    text-decoration: none;
  }
}

在编译的时候带上参数“ --style compact”:

sass --watch test.scss:test.css --style compact

該方式適合那些喜歡 單行CSS 樣式格式的朋友,編譯後的代碼如下:

nav ul { margin: 0; padding: 0; list-style: none; }
nav li { display: inline-block; }
nav a { display: block; padding: 6px 12px; text-decoration: none; }

results matching ""

    No results matching ""