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

add rule prefer-shorthand-css-notations #20

Conversation

elisecodedestrucs
Copy link
Contributor

add a rule that aims to reduce stylesheet size by using shorthand css notations

@utarwyn utarwyn added 🚀 enhancement New feature or request 🗃️ rule Impacts a rule labels Jul 25, 2023
@elisecodedestrucs elisecodedestrucs force-pushed the prefer-shorthand-css-notations branch 3 times, most recently from 0d81189 to 923c733 Compare July 25, 2023 15:43
@dedece35 dedece35 requested a review from utarwyn July 26, 2023 05:55
Copy link
Member

@utarwyn utarwyn left a 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?

@elisecodedestrucs elisecodedestrucs force-pushed the prefer-shorthand-css-notations branch 3 times, most recently from 641bf40 to eb3d586 Compare August 14, 2023 08:55
@elisecodedestrucs
Copy link
Contributor Author

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?

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
we've also tried to tailor the rule's comportment to the possibilities of each shorthand notation

@utarwyn utarwyn force-pushed the prefer-shorthand-css-notations branch from 08f53ed to 7eef0ea Compare September 17, 2023 22:20
@utarwyn utarwyn force-pushed the prefer-shorthand-css-notations branch from 910adcf to 4b5c7d0 Compare September 17, 2023 22:22
@utarwyn utarwyn merged commit 08ad152 into green-code-initiative:main Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 enhancement New feature or request 🗃️ rule Impacts a rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants