Skip to content

Instantly share code, notes, and snippets.

@mor10
Created July 11, 2016 21:04
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mor10/225c3c71d6cc38c1dbe8e463bc8a362a to your computer and use it in GitHub Desktop.
Save mor10/225c3c71d6cc38c1dbe8e463bc8a362a to your computer and use it in GitHub Desktop.
Change default fonts in Twenty Sixteen Child Theme
<?php
// Override the parent theme fonts
function twentysixteen_fonts_url() {
$fonts_url = 'https://fonts.googleapis.com/css?family=Playfair+Display:400,400i,700,700i,900,900i|Roboto+Slab:400,700';
return $fonts_url;
}
?>
/*
Typography:
Increase default font size to 18px.
Change main fonts to Roboto Slab and Playfair Display.
*/
body,
button,
input,
select,
textarea {
font-size: 18px;
font-size: 1.125rem;
line-height: 1.75;
}
body,
button,
input,
select,
textarea,
.required {
font-family: "Playfair Display", Georgia, serif;
}
/* Placeholder text color -- selectors need to be separate to work. */
::-webkit-input-placeholder {
font-family: "Roboto Slab", "Helvetica Neue", sans-serif;
}
:-moz-placeholder {
font-family: "Roboto Slab", "Helvetica Neue", sans-serif;
}
:-ms-input-placeholder {
font-family: "Roboto Slab", "Helvetica Neue", sans-serif;
}
button,
button[disabled]:hover,
button[disabled]:focus,
input[type="button"],
input[type="button"][disabled]:hover,
input[type="button"][disabled]:focus,
input[type="reset"],
input[type="reset"][disabled]:hover,
input[type="reset"][disabled]:focus,
input[type="submit"],
input[type="submit"][disabled]:hover,
input[type="submit"][disabled]:focus,
.main-navigation ,
.post-navigation,
.post-navigation .post-title,
.pagination,
.image-navigation,
.comment-navigation,
.site .skip-link,
.widget .widget-title,
.widget_recent_entries .post-date,
.widget_rss .rss-date,
.widget_rss cite,
.tagcloud a,
.site-title,
.entry-title,
.entry-footer,
.sticky-post,
.page-title,
.page-links,
.comments-title,
.comment-reply-title,
.comment-metadata,
.pingback .edit-link,
.comment-reply-link,
.comment-form label,
.no-comments,
.site-footer .site-title:after,
.widecolumn label,
.widecolumn .mu_register label {
font-family: "Roboto Slab", "Helvetica Neue", sans-serif;
}
Copy link

ghost commented Jun 4, 2017

wow, really helpful thank you

thank you ;)

@Twinset
Copy link

Twinset commented Oct 24, 2017

Thanks a lot !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment