Last active
September 15, 2017 04:59
-
-
Save tcoukoulis/b7c32297ec30893543cd74723ad803a4 to your computer and use it in GitHub Desktop.
SCSS mixin for font shorthand
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// libsass (v3.5.0.beta.2) | |
// ---- | |
@mixin font($dimensions, $family, $props: null) { | |
font: $props $dimensions #{$family}; | |
} | |
.foo { | |
@include font(14px, "Monaco, Menlo", null); | |
} | |
.bar { | |
@include font(#{14px/150%}, "Menlo, Arial") | |
} | |
.baz { | |
@include font(#{12rem/102%}, '"Space Invaders", Arial, Helvetica', 500 italic); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.foo { | |
font: 14px Monaco, Menlo; | |
} | |
.bar { | |
font: 14px/150% Menlo, Arial; | |
} | |
.baz { | |
font: 500 italic 12rem/102% "Space Invaders", Arial, Helvetica; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment