#8147·stylelint

Fix `declaration-block-no-redundant-longhand-properties` autofix for `border-radius`

Author: ajbeavenCreated Nov 29, 2024Updated Sep 11, 2026
Labelsstatus: ask to implement

What minimal example or steps are needed to reproduce the bug?

see #6958 for when this was implemented.

I've found the following issue with border-radius collapsing:

border-top-left-radius: 50% 10%;
border-top-right-radius: 50% 10%;
border-bottom-left-radius: 50% 10%;
border-bottom-right-radius: 50% 10%;

/* gets fixed to */

border-radius: 50% 10% 50% 10% 50% 10% 50% 10%;

This is invalid css. It should be fixed to the following:

border-radius: 50% / 10%;

The syntax for border-radius is stupidly obtuse though, so I don't blame you

What minimal configuration is needed to reproduce the bug?

json
{
  "rules": {
    "declaration-block-no-redundant-longhand-properties": true
  }
}

How did you run Stylelint?

Demo

Which Stylelint-related dependencies are you using?

json
{
  "stylelint": "16.10.0",
  "stylelint-config-standard": "36.0.1",
  "stylelint-config-standard-less": "3.0.1",
  "stylelint-config-standard-scss": "13.1.0",
  "stylelint-webpack-plugin": "5.0.1",
}

What did you expect to happen?

border-radius: 50% / 10%;

What actually happened?

border-radius: 50% 10% 50% 10% 50% 10% 50% 10%;

Do you have a proposal to fix the bug?

No response