stylesheets/stitch/patterns/images/_inline-icon.scss in stitch-0.1.4.beta.2 vs stylesheets/stitch/patterns/images/_inline-icon.scss in stitch-0.1.4
- old
+ new
@@ -1,5 +1,18 @@
-@mixin inline-icon($image, $spacing: 10px) {
- background: image-url($image) no-repeat left center;
- padding-left: image-width($image) + $spacing;
- line-height: image-height($image);
+//
+// Add an icon to an inline element. E.g anchor or span
+// Pass through an asset, and optionally a padding value, x-position and y-position.
+//
+
+@mixin inline-icon($img, $spacing:5px, $pos: left) {
+ background-image:image-url($img);
+ background-repeat: no-repeat;
+ @if $pos == right {
+ background-position: right top;
+ text-align: right;
+ } @else {
+ background-position: left top;
+ text-align: left;
+ }
+ line-height:image-height($img);
+ padding-#{$pos}:image-width($img) + $spacing;
}
\ No newline at end of file