Rule details
Disallow duplicate properties within declaration blocks.
What type of rule is this?
Warns about a potential problem
Example code
a {
/* Duplicate native property */
color: pink;
color: orange;
/* Duplicate custom property */
--custom-property: pink;
--custom-property: orange;
/* Not flagged with the option `allowFallbacks` */
height: 100vh;
height: 100dvh;
}
Prior Art
Participation
AI acknowledgment
Additional comments
- This proposal would mean merging two original
stylelint rules into one, as they are nearly identical.
- Property comparison is case-insensitive for native properties but case-sensitive for custom ones - matching CSS spec.
- Equivalent of
consecutive-duplicates-with-different-syntaxes option from the declaration-block-no-duplicate-properties rule should also be included: allowFallbacks.
Rule details
Disallow duplicate properties within declaration blocks.
What type of rule is this?
Warns about a potential problem
Example code
Prior Art
Participation
AI acknowledgment
Additional comments
stylelintrules into one, as they are nearly identical.consecutive-duplicates-with-different-syntaxesoption from the declaration-block-no-duplicate-properties rule should also be included:allowFallbacks.