Created
January 25, 2015 06:48
-
-
Save inriverie/0347cb2513ad7f4be0ff to your computer and use it in GitHub Desktop.
@font-face Style Linking
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
/* | |
Example of Style Linking fonts using a single font-family name. | |
DataURI `src` is url('data:font/woff2;base64,...') format('woff2'), url('data:font/woff;base64,...') format('woff'); | |
*/ | |
@font-face { | |
font-family:'myfont'; | |
src: url('myfont.woff2'), url(myfont.woff); | |
font-style: normal; | |
font-weight:400; | |
} | |
@font-face { | |
font-family:'myfont'; | |
src: url('myfont-boldItalic.woff2'), url(myfont-boldItalic.woff); | |
font-style: italic; | |
font-weight:700; | |
} | |
/* | |
When setting the font-family property on a selector, font-style and font-weight need to be defined. | |
*/ | |
.pullquote{ | |
font-family:'myfont', sans-serif; | |
font-style:italic; | |
font-weight:700; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment