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 #7609

Open
Mouvedia opened this issue Apr 13, 2024 · 2 comments
Open
Labels
status: ready to implement is ready to be worked on by someone type: bug a problem with a feature or rule

Comments

@Mouvedia
Copy link
Contributor

Mouvedia commented Apr 13, 2024

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

a {
	border-width: 7px;
	border-style: double;
	border-color: green;
}

What minimal configuration is needed to reproduce the bug?

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

How did you run Stylelint?

https://stylelint.io/demo

What did you expect to happen?

a {
	border: 7px double green;
}

Do you have a proposal to fix the bug?

add a custom resolver for border

@Mouvedia Mouvedia added status: ready to implement is ready to be worked on by someone type: bug a problem with a feature or rule labels Apr 13, 2024
@ybiquitous
Copy link
Member

@Mouvedia Thanks for the bug report. Great catch. 👍🏼

@Mouvedia Mouvedia added status: wip is being worked on by someone and removed status: ready to implement is ready to be worked on by someone labels Apr 18, 2024
@Mouvedia Mouvedia assigned Mouvedia and unassigned Mouvedia Apr 18, 2024
@Mouvedia Mouvedia added status: ready to implement is ready to be worked on by someone and removed status: wip is being worked on by someone labels Apr 19, 2024
@Mouvedia
Copy link
Contributor Author

Great catch.

Thanks.
I didn't go into details about the fix but it requires to not attempt it if the sub property longhands have more than 1 value.
The implementation will be easy but it will require many tests covering many permutations. My first attempt at fixing it was naive and foolish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready to implement is ready to be worked on by someone type: bug a problem with a feature or rule
Development

No branches or pull requests

2 participants