Created
July 14, 2014 13:40
-
-
Save leanda/79b7a691c9d4a06eaf5d to your computer and use it in GitHub Desktop.
WordPress Google Fonts
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
/** | |
* Create Mixins | |
*/ | |
@mixin font-light { | |
font-family: 'Open Sans', "Helvetica Neue", Arial, sans-serif; | |
font-weight: 300; | |
font-style: normal; | |
} | |
@mixin font-regular { | |
font-family: 'Open Sans', "Helvetica Neue", Arial, sans-serif; | |
font-weight: 400; | |
font-style: normal; | |
} | |
@mixin font-regular-italic { | |
font-family: 'Open Sans', "Helvetica Neue", Arial, sans-serif; | |
font-weight: 400; | |
font-style: italic; | |
} | |
@mixin font-bold { | |
font-family: 'Open Sans', "Helvetica Neue", Arial, sans-serif; | |
font-weight: 700; | |
font-style: normal; | |
} | |
@mixin font-bold-italic { | |
font-family: 'Open Sans', "Helvetica Neue", Arial, sans-serif; | |
font-weight: 700; | |
font-style: 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
/** | |
* Enqueue Google Fonts | |
*/ | |
function prefix_load_fonts() { | |
wp_register_style('google_Fonts', 'http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,300,700'); | |
wp_enqueue_style( 'google_Fonts'); | |
} | |
add_action('wp_print_styles', 'prefix_load_fonts'); |
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 usage on Headings | |
*/ | |
/* Headings */ | |
h1,h2,h3,h4,h5,h6 { | |
@include font-regular; | |
clear: both; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment