Last active
December 18, 2017 03:12
-
-
Save ncer/6efc59f59268e02be5ba2de9fbd8e08f to your computer and use it in GitHub Desktop.
Font Mixins / Миксины для разных шрифтовых начертаний
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
// Font variables | |
@reserveFonts: sans-serif; | |
@fontPrimary: 'Roboto Condensed', @reserveFonts; | |
// Font mixins | |
.font-primary() { | |
font-family: @fontPrimary; | |
font-weight: normal; | |
font-style: normal; | |
} | |
.font-primary-italic() { | |
font-family: @fontPrimary; | |
font-weight: normal; | |
font-style: italic; | |
} | |
.font-primary-light() { | |
font-family: @fontPrimary; | |
font-weight: 300; | |
font-style: normal; | |
} | |
.font-primary-light-italic() { | |
font-family: @fontPrimary; | |
font-weight: 300; | |
font-style: italic; | |
} | |
.font-primary-bold() { | |
font-family: @fontPrimary; | |
font-weight: 700; | |
font-style: normal; | |
} | |
.font-primary-bold-italic() { | |
font-family: @fontPrimary; | |
font-weight: 700; | |
font-style: italic; | |
} | |
// Usage | |
body { | |
.font-primary(); | |
} |
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
// Font variables | |
$reserveFonts: sans-serif; | |
$fontPrimary: 'Roboto Condensed', $reserveFonts; | |
// Font mixins | |
@mixin font-primary() { | |
font-family: $fontPrimary; | |
font-weight: normal; | |
font-style: normal; | |
} | |
@mixin font-primary-italic() { | |
font-family: $fontPrimary; | |
font-weight: normal; | |
font-style: italic; | |
} | |
@mixin font-primary-light() { | |
font-family: $fontPrimary; | |
font-weight: 300; | |
font-style: normal; | |
} | |
@mixin font-primary-light-italic() { | |
font-family: $fontPrimary; | |
font-weight: 300; | |
font-style: italic; | |
} | |
@mixin font-primary-bold() { | |
font-family: $fontPrimary; | |
font-weight: 700; | |
font-style: normal; | |
} | |
@mixin font-primary-bold-italic() { | |
font-family: $fontPrimary; | |
font-weight: 700; | |
font-style: italic; | |
} | |
// Usage | |
body { | |
@include font-primary(); | |
} |
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
// Font variables | |
$reserveFonts = sans-serif; | |
$fontPrimary = 'Roboto Condensed', $reserveFonts; | |
// Font mixins | |
font-primary() { | |
font-family: $fontPrimary; | |
font-weight: normal; | |
font-style: normal; | |
} | |
font-primary-italic() { | |
font-family: $fontPrimary; | |
font-weight: normal; | |
font-style: italic; | |
} | |
font-primary-light() { | |
font-family: $fontPrimary; | |
font-weight: 300; | |
font-style: normal; | |
} | |
font-primary-light-italic() { | |
font-family: $fontPrimary; | |
font-weight: 300; | |
font-style: italic; | |
} | |
font-primary-bold() { | |
font-family: $fontPrimary; | |
font-weight: 700; | |
font-style: normal; | |
} | |
font-primary-bold-italic() { | |
font-family: $fontPrimary; | |
font-weight: 700; | |
font-style: italic; | |
} | |
// Usage | |
body { | |
font-primary(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment