.widget {
padding: 10px;
border: 1px solid #BADA55;
background-color: #C0FFEE;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.widget-heading {
font-size: 1.5rem;
line-height: 1;
font-weight: bold;
color: #BADA55;
margin-right: -10px;
margin-left: -10px;
padding: 0.25em;
}
position、top、z-index…display、width、margin、padding…font、color、text-align…background、border、box-shadow…opacity、transition….widget-heading 縮進於 .widget 之下)。stylelint --fix)。.t10 { width: 10%; }
.t20 { width: 20%; }
.t25 { width: 25%; } /* 1/4 */
.t50 { width: 50%; } /* 1/2 */
工具類、關鍵幀、單一媒體查詢規則可單行,但**源碼仍建議多行**,發布時壓縮。