-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Advise against @extend, enable SCSS-lint ExtendDirective #8
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
Conversation
README.md
Outdated
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.
did you intend to remove the mixins section entirely?
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.
We should keep this section but reword the description. In the wake of advising against @extend, this section should recommend using mixins to DRY up code if you are also serving gzip'd code. We should maintain a note that using mixins without arguments can lead to unnecessary code duplication if you aren't gzipping.
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.
Yeah, I removed it because it only recommended against using argumentless mixins in favor of extending placeholders. I'll push a new revision that improves this section.
|
<3 |
In my previous commit, I revised this document to advise against using @extend, which included removing the section about mixins because it only existed to recommend against using argumentless mixins in favor of @extend. However, this document feels a bit incomplete without some guidance on mixin usage, so I am adding a few sentences here.
|
Alright folks, I added a section about mixins. Feedback away! |
|
👌 |
|
LGTM2 |
|
Great, if we are all good, will someone please merge? I don't appear to have access. |
Advise against @extend, enable SCSS-lint ExtendDirective
@extend is unintuitive and dangerous, so we are recommending against its
use. As part of this commit, I enabled the SCSS-lint linter that will
warn against its use. I also revised content that mentioned @extend, to
maintain philosophical consistency.