I’m facing a problem by compiling my themes. I’ll start explaining my project structure.
I have a “common” theme which is the base of all my specific themes.
Then I have a specific theme used in a Vaadin project (including the common-mixin).
Now I created a mixin within the common theme to ease the styling of buttons:
@mixin default-button($image, $hoverimage) {
background-image: $image;
&:active, &:hover {
background-image: $hoverimage;
}
&.v-disabled, &.v-disabled:active, &.v-disabled:hover {
background-image: $image;
}
}
}
This styling is used in the common theme for some buttons.
.my-button{
@include default-button(url(../buttons/mybutton.png), url(../buttons/mybutton_hover.png));
}
If I then use the button styling in my Vaadin project, the images are wrong referenced, because the current location where it starts to lookup the location of the specific project instead of the common one. I dont have the problem if I don’t use the mixin to define the button style.
Also this works if I use the mixin like this, but then my IDE shows errors in referencing the images and I loose the benefit of easy renaming, usage of images, etc:
@include default-button(url(../common/buttons/mybutton.png), url(../common/buttons/mybutton_hover.png));
I hope I described my problem properly, I guess this has sth to do with the sass compiler sequence. Any idea how I still can use the mixin to reference urls?