Robert195
(Robert Majczyna)
March 19, 2014, 9:03am
1
Hello I have problem with message parameter to the class in which the mixing can someone help me resolve this problem
main.scss
.selektor
{
@mixin background1($param)
{
background: url(…/#{$param});
}
}
styles.scss
@import “…/main/main.scss”;
@include background1(“myapplication2/img/pink.jpg”);
Daniccan
(Daniccan VP)
March 20, 2014, 8:15am
2
Hello I have problem with message parameter to the class in which the mixing can someone help me resolve this problem
main.scss
.selektor
{
@mixin background1($param)
{
background: url(…/#{$param});
}
}
styles.scss
@import “…/main/main.scss”;
@include background1(“myapplication2/img/pink.jpg”);
Try defining the mixin outside the selector.
main.scss
@mixin background1($param)
{
background:url(…/#{$param}));
}
.selektor { }
Robert195
(Robert Majczyna)
March 20, 2014, 12:47pm
3
I defining the mixin outside the selector but i cant message param to the class .selektor. Scss have global variables??
Daniccan
(Daniccan VP)
March 20, 2014, 1:01pm
4
@mixin background1($param)
{
background:$param;
}
.selektor {
@include background1(url(…/myapplication2/img/pink.jpg));
}
I think this is what you are looking for.
Robert195
(Robert Majczyna)
March 20, 2014, 2:05pm
5
@mixin background1($param)
{
background:$param;
}
.selektor {
@include background1(url(…/myapplication2/img/pink.jpg));
}
I think this is what you are looking for.
@mixin background1($param)
{
.selektor
{
background: url(…/#{$param}/img/pink.jpg);
}
}
If i have one class in mixin it works (example above) but I have many class and dont works (example below). Your solution isnt for me because in the class i will use many diffrent urls
@mixin background1($param)
{
.selektor.selector2
{
background: url(…/#{$param}/img/pink.jpg);
}
}
}