Skip to content

Instantly share code, notes, and snippets.

@VFDan
Last active April 7, 2019 20:52
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 VFDan/79f98e887eb8beaba1b1baba291f4993 to your computer and use it in GitHub Desktop.
Save VFDan/79f98e887eb8beaba1b1baba291f4993 to your computer and use it in GitHub Desktop.
A LESS function to add emphasis, and also an if operator.
.if(@condition, @property, @value) when (@condition = true){
@{property}: @value;
}
.emphasis(@bold: false, @italic: false, @underline: false, @overline: false){
.if(@bold, font-weight, bold);
.if(@italic, font-style, italic);
.if(@underline, text-decoration, underline);
.if(@overline, text-decoration, overline);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment