Answer the question
In order to leave comments, you need to log in
How to disable autoloading of _*.scss files?
Good morning!
Please tell me, in the Rails project, it turned out to be a convenient way for me to layout based on @include That is, such an option
base.scss
.class1 {
@include "c2";
}
_c2.scss
.class2 {
color: blakc;
}
My expectation is to form .class1 .class2 and it works. But! Rails autoloads the _c2.scss file, and the .class2 class begins to exist as the "root". How can I disable autoload for partishils? I didn't find anything useful on the Internet. :(
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
It all sounds kind of crazy. The code that is described should not work at all. Mixins are connected with inclusions.
If the output should be .class1 .class2 :
// base.scss
.class1 {
color: red;
}
// layout.scss
.class1 {
@extend .class1;
.class2 {
background: red;
}
}
If you disable the file, then your include will not work (because where does it get the data from?)
As you have already been told, use @mixin. The link you provided has examples.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question