Skip to content

Instantly share code, notes, and snippets.

@leanda
Created July 14, 2014 13:40
Show Gist options
  • Save leanda/79b7a691c9d4a06eaf5d to your computer and use it in GitHub Desktop.
Save leanda/79b7a691c9d4a06eaf5d to your computer and use it in GitHub Desktop.
WordPress Google Fonts
/**
* 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;
}
/**
* 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');
/**
* 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