-
Notifications
You must be signed in to change notification settings - Fork 19
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
add rule prefer-shorthand-css-notations #20
add rule prefer-shorthand-css-notations #20
Conversation
0d81189
to
923c733
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the rule @elisecodedestrucs!
I have a question: in the proposed solution, it's not possible to have "margin-top" or a "padding-bottom" alone, for example? (a warning will be raised) I don't think it's bad practice to specify just one of the margins/borders using the dedicated rule. What do you think of this?
eslint-plugin/tests/lib/rules/prefer-shorthand-css-notations.js
Outdated
Show resolved
Hide resolved
641bf40
to
eb3d586
Compare
We agree the rule might have been a little too restrictive, to fix this we've sepparated it between five rules that each cover a few css properties we considered fairly related, the goal is to be able to unable one or some rules if they turn out to be inadapted |
eslint-plugin/docs/rules/prefer-shorthand-css-notations-animation.md
Outdated
Show resolved
Hide resolved
eslint-plugin/docs/rules/prefer-shorthand-css-notations-animation.md
Outdated
Show resolved
Hide resolved
eslint-plugin/docs/rules/prefer-shorthand-css-notations-layout.md
Outdated
Show resolved
Hide resolved
eslint-plugin/lib/rules/prefer-shorthand-css-notations-margin-padding.js
Outdated
Show resolved
Hide resolved
eslint-plugin/tests/lib/rules/prefer-shorthand-css-notations-margin-padding.js
Outdated
Show resolved
Hide resolved
08f53ed
to
7eef0ea
Compare
910adcf
to
4b5c7d0
Compare
add a rule that aims to reduce stylesheet size by using shorthand css notations