.classname {
width: 100px;
}
.btn,
.btn--primary,
.btn--secondary { ... }{ 之間一空格,} 獨佔行頂格對齊選擇器。.classname {} property: value;.heading-1,
.heading-2,
.heading-3 {
font-family: var(--font-heading);
font-weight: 700;
line-height: 1.2;
margin-top: 0;
}
開發環境遵循上述展開風格,**構建階段**通過 cssnano、clean-css 壓縮為單行無空格版本,部署至 CDN。源碼保持可讀,產物極致精簡。
"singleQuote": true, "tabWidth": 2, "printWidth": 120block-opening-brace-space-before: "always", declaration-colon-space-after: "always", declaration-block-trailing-semicolon: "always"indent_style = space, indent_size = 2, end_of_line = lf代碼風格是團隊協作的「交通規則」。統一的展開式多行、選擇器分行、強制尾分號、語義分組,配合 Prettier/Stylelint 自動化執行,將格式爭議降為零,讓 Code Review 聚焦邏輯架構而非空格分號。