src/content/docs/linter/rules/no-shorthand-property-overrides.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="CSS" icon="seti:css"> ## Summary - Rule available since: `v1.8.2` - Diagnostic Category: [`lint/suspicious/noShorthandPropertyOverrides`](/reference/diagnostics#diagnostic-category) - This rule is **recommended**, meaning it is enabled by default. - This rule doesn't have a fix. - The default severity of this rule is [**error**](/reference/diagnostics#error). - Sources: - Same as [`declaration-block-no-shorthand-property-overrides`](https://github.com/stylelint/stylelint/blob/main/lib/rules/declaration-block-no-shorthand-property-overrides/README.md){
"linter": {
"rules": {
"suspicious": {
"noShorthandPropertyOverrides": "error"
}
}
}
}
Disallow shorthand properties that override related longhand properties.
For details on shorthand properties, see the MDN web docs.
a { padding-left: 10px; padding: 20px; }
a { padding: 10px; padding-left: 20px; }
a { transition-property: opacity; } a { transition: opacity 1s linear; }