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

Reconsider declaration-block-no-redundant-longhand-properties #42

Open
thibaudcolas opened this issue Dec 18, 2023 · 1 comment
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@thibaudcolas
Copy link
Member

Follow-up to wagtail/wagtail#10719 / wagtail/wagtail#11151 – where I’ve disabled this rule for now.

I’m not sure how much I like the idea of enforcing this rule for margin / padding properties. The main annoyance from my side is that when you want to set both properties with a similar-enough values, it’s nice to have them both side by side on the same line.

But when the values are quite complex, it would be nice to split into separate lines. Though this can be worked around with variables.

It’s also a bit annoying when you want to add one new longhand property in a situation where a shorthand would be possible – and the diff of the change becomes muddled up between "new" changes and refactorings due to the enforcement of a rule like this.


Not something I’d feel strongly about but I’d like to hear what others think?

@lb-
Copy link
Member

lb- commented Dec 19, 2023

I'm all for removing it, it can cause some unwanted churn in the code and also makes it harder to reason about cascading values that override a specific property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants