stylelint: Fix `declaration-block-no-redundant-longhand-properties` and `declaration-block-no-shorthand-property-overrides` false negatives for `transition-behavior`
What minimal example or steps are needed to reproduce the bug?
a {
transition-behavior: foo;
transition-delay: foo;
transition-duration: foo;
transition-property: foo
transition-timing-function: foo;
}
a {
transition-behavior: foo;
transition: foo;
}
Details
The low browser support—under 90%—is not a problem for declaration-block-no-redundant-longhand-properties because we provide the ignoreLonghands option.
Nonetheless Id prefer if the issue was labeled status: agreed but held for now.
Do you have a proposal to fix the bug?
Add 'transition-behavior' to this set:
Update this resolver:
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 15 (15 by maintainers)
@ybiquitous here’s an explanation of the problem.
On browsers that don’t support
transition-behaviorthetransitionproperty will be dropped altogether becauseallow-discretemakes it invalid. Since the browser support—in my point of view—is at this stage too low according to caniuse, the option should be used so that it would instead be fixed to:Is that clearer?
ignoreLonghandswas exactly introduced to handle that kind of cases.tl;dr: either wait till 2025 to fix this issue or add the option to
stylelint-standard-config@Mouvedia What reason do you think so?
IMO, it seems more reasonable to change the existing logic
declaration-block-no-redundant-longhand-propertiesthan addingignoreLonghandstostylelint-config-standard:https://github.com/stylelint/stylelint/blob/ee3118d2460cddf469f959b5438d8aeab7e9584e/lib/rules/declaration-block-no-redundant-longhand-properties/index.mjs#L116-L117
See also:
– https://github.com/stylelint/stylelint-config-standard/blob/d319b67e7b8a546bca84c6a909764171df587d7e/index.js#L55