-
-
Save Sha1fei/997fff2f0258d7944f6a04821e7605e9 to your computer and use it in GitHub Desktop.
Font Mixins / Миксины для разных шрифтовых начертаний
This file contains hidden or 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 hidden or 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 hidden or 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