Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix declaration-block-no-redundant-longhand-properties autofix for border-radius shorthand #6958

Merged
merged 2 commits into from Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/violet-otters-rule.md
@@ -0,0 +1,5 @@
---
"stylelint": patch
---

Fixed: `declaration-block-no-redundant-longhand-properties` autofix for `border-radius` shorthand
2 changes: 1 addition & 1 deletion lib/reference/properties.js
Expand Up @@ -141,8 +141,8 @@ const longhandSubPropertiesOfShorthandProperties = new Map([
'border-radius',
new Set([
// prettier-ignore
'border-top-right-radius',
'border-top-left-radius',
'border-top-right-radius',
'border-bottom-right-radius',
'border-bottom-left-radius',
]),
Expand Down
Expand Up @@ -206,6 +206,12 @@ testRule({
description: 'autofixer should not mangle css functions with comma separated values',
message: messages.expected('transition'),
},
{
code: 'a { border-top-left-radius: 1em; border-top-right-radius: 2em; border-bottom-right-radius: 3em; border-bottom-left-radius: 4em; }',
fixed: 'a { border-radius: 1em 2em 3em 4em; }',
description: 'explicit border-radius test',
message: messages.expected('border-radius'),
},
Mouvedia marked this conversation as resolved.
Show resolved Hide resolved
],
});

Expand Down