Skip to content

Instantly share code, notes, and snippets.

@morganfeeney
Last active April 5, 2016 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morganfeeney/f4318d4834abbe7b4e5aa9355d1e88b3 to your computer and use it in GitHub Desktop.
Save morganfeeney/f4318d4834abbe7b4e5aa9355d1e88b3 to your computer and use it in GitHub Desktop.
// Settings - these need moving to the variables.less file I think
@icon-font-line-height: 1;
@icon-font-size-base: @font-size-base;
// Defaults used by the icon mixins
@icon-font-default-icon: "\f245";
@icon-font-default-color: inherit;
@icon-font-default-margin: (@grid-gutter-width/2);
@icon-font-default-icon: @shopping-cart;
@grid-gutter-width: 12px;
@font-size-base: 14px;
@shopping-cart: "\f07a";
@up: "\f077";
@position: before;
@color: red;
//@loop: false;
.create-loop-icon (@loop: false, @content: @icon-font-default-icon, @color: green) when not (@loop = true) {
&:@{position} {
content: @content;
color: @color;
}
}
.create-loop-icon (@loop: false, @content: @icon-font-default-icon, @color: orange) when (@loop = true) {
&:@{position} {
background: purple;
content: @content;
color: @color;
}
}
.test-class {
.create-loop-icon(@loop:true, @content: "test", @color: blue);
}
.test-class2 {
.create-loop-icon(@color: green, @content: "");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment