Answer the question
In order to leave comments, you need to log in
How to set a set of properties through a variable in sass?
Is it possible to set a set of properties to a variable in sass and pass them to it?
For example, I do not want to write in every 2nd block
position:relative;
width:100%;
height:auto;
Answer the question
In order to leave comments, you need to log in
Or use mixins
@mixin mix1 {
position:relative;
width:100%;
height:auto;
}
.selector {
@include mix1;
}
%set1 {
position:relative;
width:100%;
height:auto;
}
.selector {
@extend %set1;
}
.someclass {
position:relative;
width:100%;
height:auto;
}
.selector {
@extend .someclass;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question