Answer the question
In order to leave comments, you need to log in
What is the best way to do inheritance for rare elements in Ruby Sass?
What is the best way to do inheritance for rare elements in Ruby Sass?
For example, for each .page__mainimg
there will be the same background properties (position, size, repaet), but the value of the url property will be different on the pages depending on the location in the block with the corresponding name.
.page {
&__mainimg {
@include background-image(center, cover, no-repeat);
min-height: 500px;
}
}
#main_page {
.page__mainimg {
background-image: url("/img/mainimg.jpg");
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question