-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
style: fix sasslint warnings #11227
style: fix sasslint warnings #11227
Conversation
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.
Some new sasslint rules would be useful there. Like sasstools/sass-lint#950. Almost half of the changes in this PR are due to force-element-nesting
.
I would prefer to disable this option than to add so much useless nesting.
scss/components/_accordion-menu.scss
Outdated
margin-top: -1 * ($accordionmenu-arrow-size / 2); | ||
#{$global-right}: 1rem; | ||
.is-accordion-submenu-parent { | ||
&:not(.has-submenu-toggle) > a { |
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.
This may be needed because of the force-element-nesting
rule. I find this rule too restrictive and think that we should allow complex selectors when they cannot be marged.
But sass-lint
seems badly maintained now. 😞
|
||
width: $accordionmenu-submenu-toggle-width; | ||
height: $accordionmenu-submenu-toggle-height; | ||
|
||
cursor: pointer; |
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.
cursor
should be after border
font-size: map-get($button-sizes, default); | ||
font-weight: $button-font-weight; | ||
-webkit-appearance: none; // sass-lint:disable-line no-vendor-prefixes |
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.
Do we need -webkit-appearance
instead of appearance
here ? Autoprefixer supports it now.
// No base style is required for solid buttons, do nothing | ||
} | ||
@else if $fill == hollow { | ||
@if $fill == hollow { |
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 could still keep a comment about solid buttons above this.
Hm, should we migrate to stylelint and use their scss plugin pack? |
stylelint looks great but for now we could simply disable |
@@ -51,7 +51,7 @@ $accordionmenu-submenu-toggle-height: $accordionmenu-submenu-toggle-width !defau | |||
$accordionmenu-arrow-size: 6px !default; | |||
|
|||
@mixin zf-accordion-menu-left-right-arrows { | |||
.is-accordion-submenu-parent:not(.has-submenu-toggle) > a { | |||
.is-accordion-submenu-parent:not(.has-submenu-toggle) > a { // sass-lint:disable-line force-element-nesting force-pseudo-nesting |
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.
I meant: disabling it for the entire project in .sass-lint.yml
.
You can squash commits after this.
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.
I meant: disabling it for the entire project in .sass-lint.yml.
You can squash commits after this.
Done
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.
👍 LGTM. Thank you @DanielRuf
…arnings for v6.5.0 92b2f18 style: fix sasslint warnings Signed-off-by: Nicolas Coden <nicolas@ncoden.fr>
Description
This fixes many of the current sasslint warnings.
Motivation and Context
Currently sasslint warns about many things which are not as they should be according to the sasslint config.
Types of changes
functionality to change)
Checklist (all required):
develop
orsupport/*
).