Skip to content

Instantly share code, notes, and snippets.

@nacin
Forked from lancewillett/gist:3494374
Created August 28, 2012 02:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nacin/3494376 to your computer and use it in GitHub Desktop.
Save nacin/3494376 to your computer and use it in GitHub Desktop.
Index: wp-content/themes/twentytwelve/style.css
===================================================================
--- wp-content/themes/twentytwelve/style.css (revision 21639)
+++ wp-content/themes/twentytwelve/style.css (working copy)
@@ -437,10 +437,13 @@
body {
font-size: 14px;
font-size: 1rem;
- font-family: "Open Sans", Helvetica, Arial, sans-serif;
+ font-family: Helvetica, Arial, sans-serif;
text-rendering: optimizeLegibility;
color: #444;
}
+body.open-sans {
+ font-family: "Open Sans", Helvetica, Arial, sans-serif;
+}
a {
outline: none;
color: #21759b;
Index: wp-content/themes/twentytwelve/functions.php
===================================================================
--- wp-content/themes/twentytwelve/functions.php (revision 21639)
+++ wp-content/themes/twentytwelve/functions.php (working copy)
@@ -373,6 +373,9 @@
elseif ( in_array( $background_color, array( 'fff', 'ffffff' ) ) )
$classes[] = 'custom-background-white';
+ if ( wp_script_is( 'twentytwelve-fonts', 'queue' ) )
+ $classes[] = 'open-sans';
+
return $classes;
}
add_filter( 'body_class', 'twentytwelve_body_class' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment