Working with gulp for sprite creation, I encountered an issue with one of the images.
$s-ico-webdesign: '442px', '0px', '-442px', '0px', '60px', '60px', '538px', '519px', 'sprite.png';
The data in this array represents the sprite image. In order to set the margin-top as half of the height of a sprite element, I have created the following mixin:
@mixin sprite-top-half-margin($sprite) {
$height: #{nth($sprite, 6)} / 2;
margin-top : $height;
}
In my code snippet, I am trying to implement this mixin like so:
.add-nav .sub-menu .web-design a:before {
@include sprite($s-ico-webdesign);
@include sprite-top-half-margin($s-ico-webdesign);
left:22px;
}
However, the margin-top property is not compiling as expected. Can anyone point out where I may be going wrong?