Answer the question
In order to leave comments, you need to log in
How to use mixin with 2 parameters in url in less?
How to use mixin with 2 parameters in url in less?
Non-working code:
.pic_url(@folder;@name) {
background-image: url("/@{folder}/@{name}.png");
}
.span {
.pic_url(F1;N1);
}
.span {
background-image: url("/F1/N1.png");
}
Answer the question
In order to leave comments, you need to log in
.pic_url(@folder: define;@name: me) {
background-image: url("/@{folder}/@{name}.png");
}
.span {
.pic_url();
}
.span {
.pic_url(images;some);
}
.span {
.pic_url(@name: pls);
}
.span {
.pic_url(@folder: folder;@name: file);
}
.span {
background-image: url("/define/me.png");
}
.span {
background-image: url("/images/some.png");
}
.span {
background-image: url("/define/pls.png");
}
.span {
background-image: url("/folder/file.png");
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question