Skip to content

Instantly share code, notes, and snippets.

@VFDan
Last active Apr 7, 2019
Embed
What would you like to do?
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