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

Ignore transition and animation from declaration-block-no-redundant-longhand-properties rule #407

Closed
gerardo-rodriguez opened this issue Oct 12, 2023 · 3 comments

Comments

@gerardo-rodriguez
Copy link
Member

It is especially helpful when adding CSS transitions or keyframe animations to use longhand properties.

We should be able to ignore transition and animation and I think that would be enough: https://stylelint.io/user-guide/rules/declaration-block-no-redundant-longhand-properties/#optional-secondary-options

@Paul-Hebert
Copy link
Member

Thanks for filing this Gerardo! I agree.

To be honest I'd also be fine disabling this rule altogether for a few reasons:

  • When using custom properties the shorthand can get really long
  • Sometimes the short hands can get confusing for properties with lots of values (e.g. the font example in the "valid patterns" section of the docs)
  • I honestly have to spend time thinking every time I see margin: 1px 2px 3px 4px to remember which value affects which side.

That might just be me though 🤷

@gerardo-rodriguez
Copy link
Member Author

I'm totally cool disabling it all together. 👍🏽

@spaceninja
Copy link
Member

Disabling it altogether is probably the best option if we're finding ourselves disabling it a lot. Linting is only helpful if it's, you know, helpful. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants