I'm cleaning up all my analysis warnings in my theme.scss
file. Though I am not sure how to clear this one...
I have a @mixin
called accent-colors
which simply loops through a sass map of colours by key/value, and wraps the @content
directive input with a .accent-#{$key}
parent class selector.
@mixin accent-colors {
@each $key, $value in $accent-colors {
$accent-name: $key !global;
$accent-color: $value !global;
.accent-#{$key} & {
@content
}
}
}
This @mixin accent-colors
is located in a separate file _mixins.scss
which is imported into theme.scss
using @import "mixins"
.
The @content
directive allows variables to be passed into this via @include accent-colors { }
Here is an example...
.button
@include accent-colors {
color: $accent-color;
}
}
The above sass code works fine, but I get this analysis warning in my IDE (phpstorm) in the theme.scss
file...
Is there a way to some how suppress this IDE analysis warning in my theme.scss
file?
Many Thanks