如何洗掉 CSS 屬性(如-webkit-box-shadow和)的 stylelint 規則-moz-box-shadow?因為它box-shadow在我運行--fix命令時被覆寫。
以下是我的.stylelintrc.json檔案規則串列:
{
"extends": "stylelint-config-recommended-scss",
"plugins": ["stylelint-order"],
"rules": {
"order/properties-alphabetical-order": true,
"at-rule-no-unknown": null,
"no-eol-whitespace": null,
"indentation": 2,
"number-leading-zero": null,
"at-rule-no-vendor-prefix": true,
"media-feature-name-no-vendor-prefix": true,
"property-no-vendor-prefix": true,
"selector-no-vendor-prefix": true,
"value-no-vendor-prefix": true,
"string-quotes": "single",
"at-rule-name-case": null,
"no-invalid-position-at-import-rule": null,
"scss/at-import-partial-extension": null,
"no-empty-source": null,
"no-descending-specificity": null,
"selector-pseudo-element-no-unknown": [
true,
{
"ignorePseudoElements": ["ng-deep", "input-placeholder"]
}
]
}
}
有什么選項可以為特定添加規則CSS property嗎?任何幫助將不勝感激。
uj5u.com熱心網友回復:
您可以使用規則的ignoreProperties輔助選項來指定您不想取消前綴的屬性。property-no-vendor-prefix
例如,忽略box-shadow:
{
"rules": {
"property-no-vendor-prefix": [true, { "ignoreProperties": ["box-shadow"] }]
}
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/493316.html
