123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318 |
- <?php
- add_filter( 'typekit_add_font_category_rules', function( $category_rules ) {
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'html',
- array(
- array( 'property' => 'font-family', 'value' => 'sans-serif' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'b,
- strong',
- array(
- array( 'property' => 'font-weight', 'value' => 'bold' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'dfn',
- array(
- array( 'property' => 'font-style', 'value' => 'italic' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'headings',
- 'h1',
- array(
- array( 'property' => 'font-size', 'value' => '2em' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'small',
- array(
- array( 'property' => 'font-size', 'value' => '80%' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'sub,
- sup',
- array(
- array( 'property' => 'font-size', 'value' => '75%' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'code,
- kbd,
- pre,
- samp',
- array(
- array( 'property' => 'font-size', 'value' => '1em' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'optgroup',
- array(
- array( 'property' => 'font-weight', 'value' => 'bold' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.screen-reader-text:focus',
- array(
- array( 'property' => 'font-size', 'value' => '14px' ),
- array( 'property' => 'font-weight', 'value' => 'bold' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'body,
- button,
- input,
- select,
- textarea,
- #respond,
- .highlander-enabled #respond,
- .highlander-enabled #respond .form-submit input,
- .highlander-enabled #respond .form-submit input#comment-submit,
- .highlander-enabled #respond .comment-form-fields input[type=submit],
- .highlander-enabled #respond p.form-submit input[type=submit],
- .highlander-enabled #respond input[type=submit],
- .highlander-enabled #respond #commentform #comment-submit,
- .comment-reply-title small,
- #jp-post-flair h3.sd-title,
- #jp-post-flair div.sharedaddy h3.sd-title,
- #jp-post-flair .jp-relatedposts .jp-relatedposts-headline em',
- array(
- array( 'property' => 'font-family', 'value' => '"Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif' ),
- array( 'property' => 'font-size', 'value' => '16px' ),
- array( 'property' => 'font-weight', 'value' => '300' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.testimonials .hentry .entry-title,
- .card .entry-title,
- .comment-author .fn',
- array(
- array( 'property' => 'font-size', 'value' => '24px' ),
- array( 'property' => 'font-family', 'value' => '"Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif' ),
- array( 'property' => 'font-weight', 'value' => '600' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'headings',
- 'h1,
- h2,
- h3,
- h4,
- h5,
- h6,
- .single .hentry .entry-title',
- array(
- array( 'property' => 'font-family', 'value' => '"Playfair Display SC", "Times New Roman", Times, serif' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'cite,
- dfn,
- em,
- i',
- array(
- array( 'property' => 'font-style', 'value' => 'italic' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'headings',
- 'blockquote,
- .testimonials .entry-content p',
- array(
- array( 'property' => 'font-family', 'value' => '"Playfair Display", "Times New Roman", Times, serif' ),
- array( 'property' => 'font-size', 'value' => '20px' ),
- array( 'property' => 'font-style', 'value' => 'normal' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'pre',
- array(
- array( 'property' => 'font-size', 'value' => '15px' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'code,
- kbd,
- tt,
- var',
- array(
- array( 'property' => 'font-size', 'value' => '15px' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'big',
- array(
- array( 'property' => 'font-size', 'value' => '125%' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'button,
- input[type="button"],
- input[type="reset"],
- input[type="submit"]',
- array(
- array( 'property' => 'font-size', 'value' => '16px' ),
- array( 'property' => 'font-weight', 'value' => '600' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'button:hover,
- input[type="button"]:hover,
- input[type="reset"]:hover,
- input[type="submit"]:hover',
- array(
- array( 'property' => 'font-weight', 'value' => '600' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- 'dt',
- array(
- array( 'property' => 'font-weight', 'value' => 'bold' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.entry-content table thead tr',
- array(
- array( 'property' => 'font-size', 'value' => '12.8px' ),
- array( 'property' => 'font-weight', 'value' => '700' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.main-navigation .children a:before,
- .main-navigation .sub-menu a:before',
- array(
- array( 'property' => 'font-weight', 'value' => '100' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.main-navigation a',
- array(
- array( 'property' => 'font-weight', 'value' => '600' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.main-navigation .dropdown-toggle:after',
- array(
- array( 'property' => 'font-size', 'value' => '16px' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.main-navigation a span',
- array(
- array( 'property' => 'font-size', 'value' => '12px' ),
- array( 'property' => 'font-weight', 'value' => '300' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.main-navigation .dropdown-toggle:after',
- array(
- array( 'property' => 'font-size', 'value' => '12px' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.footer-navigation a',
- array(
- array( 'property' => 'font-size', 'value' => '12px' ),
- array( 'property' => 'font-weight', 'value' => '700' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.comment-navigation a .meta-nav,
- .post-navigation a .meta-nav,
- .posts-navigation a .meta-nav',
- array(
- array( 'property' => 'font-size', 'value' => '12px' ),
- array( 'property' => 'font-weight', 'value' => '700' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.comment-navigation a .meta-title,
- .post-navigation a .meta-title,
- .posts-navigation a .meta-title',
- array(
- array( 'property' => 'font-size', 'value' => '24px' ),
- array( 'property' => 'font-family', 'value' => '"Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif' ),
- array( 'property' => 'font-weight', 'value' => '600' ),
- array( 'property' => 'font-size', 'value' => '18px' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.comment-navigation.comment-navigation a,
- .post-navigation.comment-navigation a,
- .posts-navigation.comment-navigation a',
- array(
- array( 'property' => 'font-size', 'value' => '24px' ),
- array( 'property' => 'font-family', 'value' => '"Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif' ),
- array( 'property' => 'font-weight', 'value' => '600' ),
- array( 'property' => 'font-size', 'value' => '18px' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.comment-navigation a .meta-title,
- .post-navigation a .meta-title,
- .posts-navigation a .meta-title',
- array(
- array( 'property' => 'font-size', 'value' => '24px' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'headings',
- '.site-branding .site-title,
- .featured-content-inner .hentry .entry-title',
- array(
- array( 'property' => 'font-family', 'value' => '"Playfair Display SC", "Times New Roman", Times, serif' ),
- array( 'property' => 'font-size', 'value' => '24px' ),
- array( 'property' => 'font-weight', 'value' => '600' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'headings',
- '.site-branding .site-title',
- array(
- array( 'property' => 'font-size', 'value' => '24px' ),
- )
- );
- TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
- '.search-box .search-field',
- array(
- array( 'property' => 'font-size', 'value' => '16px' ),
- array( 'property' => 'font-weight', 'value' => '300' ),
- )
- );
- return $category_rules;
- } );
|