jetpack-fonts.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768
  1. <?php
  2. add_filter( 'typekit_add_font_category_rules', function( $category_rules ) {
  3. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  4. 'a,
  5. abbr,
  6. acronym,
  7. address,
  8. applet,
  9. big,
  10. blockquote,
  11. body,
  12. caption,
  13. cite,
  14. code,
  15. dd,
  16. del,
  17. dfn,
  18. div,
  19. dl,
  20. dt,
  21. em,
  22. fieldset,
  23. font,
  24. form,
  25. h3,
  26. h5,
  27. html,
  28. iframe,
  29. ins,
  30. kbd,
  31. label,
  32. legend,
  33. li,
  34. object,
  35. ol,
  36. p,
  37. pre,
  38. q,
  39. s,
  40. samp,
  41. small,
  42. span,
  43. strike,
  44. strong,
  45. sub,
  46. sup,
  47. table,
  48. tbody,
  49. td,
  50. tfoot,
  51. th,
  52. thead,
  53. tr,
  54. tt,
  55. ul,
  56. var',
  57. array(
  58. array( 'property' => 'font-family', 'value' => 'inherit' ),
  59. array( 'property' => 'font-style', 'value' => 'inherit' ),
  60. array( 'property' => 'font-weight', 'value' => 'inherit' ),
  61. )
  62. );
  63. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  64. 'h1,
  65. h1 a,
  66. h2,
  67. h2 a,
  68. h4,
  69. h4 a,
  70. h6,
  71. h6 a',
  72. array(
  73. array( 'property' => 'font-family', 'value' => 'inherit' ),
  74. array( 'property' => 'font-size', 'value' => '100%' ),
  75. array( 'property' => 'font-style', 'value' => 'inherit' ),
  76. array( 'property' => 'font-weight', 'value' => 'inherit' ),
  77. )
  78. );
  79. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  80. 'caption,
  81. td,
  82. th',
  83. array(
  84. array( 'property' => 'font-weight', 'value' => 'normal' ),
  85. )
  86. );
  87. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  88. 'body,
  89. button,
  90. input,
  91. select,
  92. textarea',
  93. array(
  94. array( 'property' => 'font-family', 'value' => '"Libre Baskerville", Baskerville, "Book Antiqua", Georgia, Times, serif' ),
  95. array( 'property' => 'font-size', 'value' => '18px' ),
  96. )
  97. );
  98. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  99. 'h1',
  100. array(
  101. array( 'property' => 'font-family', 'value' => '"Playfair Display", Georgia, serif' ),
  102. array( 'property' => 'font-size', 'value' => '44px' ),
  103. array( 'property' => 'font-style', 'value' => 'italic' ),
  104. )
  105. );
  106. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  107. 'h2',
  108. array(
  109. array( 'property' => 'font-family', 'value' => 'Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif' ),
  110. array( 'property' => 'font-size', 'value' => '21px' ),
  111. )
  112. );
  113. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  114. 'h3',
  115. array(
  116. array( 'property' => 'font-size', 'value' => '25px' ),
  117. array( 'property' => 'font-style', 'value' => 'italic' ),
  118. )
  119. );
  120. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  121. 'h4',
  122. array(
  123. array( 'property' => 'font-family', 'value' => 'Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif' ),
  124. array( 'property' => 'font-size', 'value' => '16px' ),
  125. )
  126. );
  127. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  128. 'h5',
  129. array(
  130. array( 'property' => 'font-size', 'value' => '21px' ),
  131. array( 'property' => 'font-style', 'value' => 'italic' ),
  132. )
  133. );
  134. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  135. 'h6',
  136. array(
  137. array( 'property' => 'font-family', 'value' => 'Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif' ),
  138. array( 'property' => 'font-size', 'value' => '14px' ),
  139. )
  140. );
  141. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  142. 'b,
  143. strong',
  144. array(
  145. array( 'property' => 'font-weight', 'value' => 'bold' ),
  146. )
  147. );
  148. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  149. 'cite,
  150. dfn,
  151. em,
  152. i',
  153. array(
  154. array( 'property' => 'font-style', 'value' => 'italic' ),
  155. )
  156. );
  157. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  158. 'blockquote',
  159. array(
  160. array( 'property' => 'font-family', 'value' => '"Playfair Display", Georgia, serif' ),
  161. array( 'property' => 'font-size', 'value' => '36px' ),
  162. array( 'property' => 'font-style', 'value' => 'italic' ),
  163. )
  164. );
  165. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  166. 'blockquote::before',
  167. array(
  168. array( 'property' => 'font-size', 'value' => '208px' ),
  169. array( 'property' => 'font-style', 'value' => 'normal' ),
  170. )
  171. );
  172. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  173. 'blockquote cite',
  174. array(
  175. array( 'property' => 'font-family', 'value' => 'Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif' ),
  176. array( 'property' => 'font-size', 'value' => '16px' ),
  177. array( 'property' => 'font-style', 'value' => 'normal' ),
  178. )
  179. );
  180. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  181. 'blockquote.alignleft,
  182. blockquote.alignright',
  183. array(
  184. array( 'property' => 'font-size', 'value' => '27px' ),
  185. )
  186. );
  187. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  188. 'sub,
  189. sup',
  190. array(
  191. array( 'property' => 'font-size', 'value' => '75%' ),
  192. )
  193. );
  194. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  195. 'small',
  196. array(
  197. array( 'property' => 'font-size', 'value' => '75%' ),
  198. )
  199. );
  200. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  201. 'big',
  202. array(
  203. array( 'property' => 'font-size', 'value' => '125%' ),
  204. )
  205. );
  206. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  207. '.wp-caption strong,
  208. b em,
  209. b i,
  210. em b,
  211. em strong,
  212. i b,
  213. i strong,
  214. strong em,
  215. strong i',
  216. array(
  217. array( 'property' => 'font-size', 'value' => '0.8em' ),
  218. array( 'property' => 'font-style', 'value' => 'normal' ),
  219. array( 'property' => 'font-weight', 'value' => 'bold' ),
  220. )
  221. );
  222. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  223. 'b code,
  224. em code,
  225. i code,
  226. strong code',
  227. array(
  228. array( 'property' => 'font-style', 'value' => 'normal' ),
  229. array( 'property' => 'font-weight', 'value' => 'normal' ),
  230. )
  231. );
  232. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  233. 'dt',
  234. array(
  235. array( 'property' => 'font-weight', 'value' => 'bold' ),
  236. )
  237. );
  238. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  239. 'table',
  240. array(
  241. array( 'property' => 'font-size', 'value' => '0.85em' ),
  242. )
  243. );
  244. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  245. 'th',
  246. array(
  247. array( 'property' => 'font-style', 'value' => 'italic' ),
  248. )
  249. );
  250. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  251. 'thead th',
  252. array(
  253. array( 'property' => 'font-style', 'value' => 'normal' ),
  254. array( 'property' => 'font-weight', 'value' => 'bold' ),
  255. )
  256. );
  257. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  258. 'button,
  259. input,
  260. select,
  261. textarea',
  262. array(
  263. array( 'property' => 'font-size', 'value' => '100%' ),
  264. )
  265. );
  266. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  267. 'input[type="email"],
  268. input[type="password"],
  269. input[type="search"],
  270. input[type="text"],
  271. input[type="url"],
  272. textarea',
  273. array(
  274. array( 'property' => 'font-size', 'value' => '14px' ),
  275. )
  276. );
  277. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  278. 'button,
  279. input[type="submit"]',
  280. array(
  281. array( 'property' => 'font-size', 'value' => '12px' ),
  282. )
  283. );
  284. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  285. 'label',
  286. array(
  287. array( 'property' => 'font-size', 'value' => '18px' ),
  288. array( 'property' => 'font-style', 'value' => 'italic' ),
  289. )
  290. );
  291. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  292. '.post-password-form label',
  293. array(
  294. array( 'property' => 'font-family', 'value' => 'Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif' ),
  295. array( 'property' => 'font-size', 'value' => '12px' ),
  296. )
  297. );
  298. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  299. 'label span',
  300. array(
  301. array( 'property' => 'font-size', 'value' => '0.9em' ),
  302. )
  303. );
  304. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  305. '.site-branding h1',
  306. array(
  307. array( 'property' => 'font-family', 'value' => '"Playfair Display"' ),
  308. array( 'property' => 'font-size', 'value' => '36px' ),
  309. array( 'property' => 'font-style', 'value' => 'normal' ),
  310. array( 'property' => 'font-weight', 'value' => '700' ),
  311. )
  312. );
  313. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  314. '.title-block h1',
  315. array(
  316. array( 'property' => 'font-style', 'value' => 'normal' ),
  317. )
  318. );
  319. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  320. '#site-navigation .search-form .search-submit,
  321. #site-navigation .search-form label',
  322. array(
  323. array( 'property' => 'font-size', 'value' => '18px' ),
  324. )
  325. );
  326. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  327. '#site-navigation .search-form label:hover',
  328. array(
  329. array( 'property' => 'font-weight', 'value' => 'normal' ),
  330. )
  331. );
  332. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  333. '#colophon .site-info',
  334. array(
  335. array( 'property' => 'font-size', 'value' => '14px' ),
  336. )
  337. );
  338. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  339. '[class*="navigation"] .next a,
  340. [class*="navigation"] .previous a',
  341. array(
  342. array( 'property' => 'font-style', 'value' => 'italic' ),
  343. )
  344. );
  345. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  346. '.next .meta-nav,
  347. .previous .meta-nav',
  348. array(
  349. array( 'property' => 'font-family', 'value' => 'Montserrat' ),
  350. array( 'property' => 'font-size', 'value' => '12px' ),
  351. array( 'property' => 'font-style', 'value' => 'normal' ),
  352. )
  353. );
  354. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  355. '.next .meta-nav a,
  356. .previous .meta-nav a',
  357. array(
  358. array( 'property' => 'font-style', 'value' => 'normal' ),
  359. )
  360. );
  361. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  362. '.entry-meta',
  363. array(
  364. array( 'property' => 'font-style', 'value' => 'italic' ),
  365. )
  366. );
  367. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  368. '.entry-title,
  369. .entry-title a',
  370. array(
  371. array( 'property' => 'font-family', 'value' => '"Playfair Display"' ),
  372. array( 'property' => 'font-size', 'value' => '44px' ),
  373. array( 'property' => 'font-style', 'value' => 'normal' ),
  374. )
  375. );
  376. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  377. '.emphasis:first-letter,
  378. .format-standard:not(.post-password-required) .entry-content > p:not(.no-emphasis):first-of-type:first-letter,
  379. .page:not(.post-password-required) .entry-content > p:not(.no-emphasis):first-of-type:first-letter',
  380. array(
  381. array( 'property' => 'font-family', 'value' => '"Playfair Display"' ),
  382. array( 'property' => 'font-size', 'value' => '121px' ),
  383. array( 'property' => 'font-style', 'value' => 'normal' ),
  384. array( 'property' => 'font-weight', 'value' => '700' ),
  385. )
  386. );
  387. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  388. '.emphasis:first-line,
  389. .format-standard:not(.post-password-required) .entry-content > p:not(.no-emphasis):first-of-type:first-line,
  390. .page:not(.post-password-required) .entry-content > p:not(.no-emphasis):first-of-type:first-line',
  391. array(
  392. array( 'property' => 'font-family', 'value' => '"Playfair Display SC"' ),
  393. array( 'property' => 'font-size', 'value' => '1em' ),
  394. array( 'property' => 'font-style', 'value' => 'normal !important' ),
  395. array( 'property' => 'font-weight', 'value' => 'bold' ),
  396. )
  397. );
  398. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  399. '.more-link,
  400. .more-link:visited',
  401. array(
  402. array( 'property' => 'font-family', 'value' => '"Playfair Display"' ),
  403. array( 'property' => 'font-size', 'value' => '21px' ),
  404. array( 'property' => 'font-style', 'value' => 'italic' ),
  405. )
  406. );
  407. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  408. '.more-link:after,
  409. .more-link:before',
  410. array(
  411. array( 'property' => 'font-size', 'value' => '1.5em' ),
  412. array( 'property' => 'font-style', 'value' => 'normal' ),
  413. )
  414. );
  415. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  416. '.format-aside .entry-content',
  417. array(
  418. array( 'property' => 'font-size', 'value' => '21px' ),
  419. array( 'property' => 'font-style', 'value' => 'italic' ),
  420. )
  421. );
  422. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  423. '.format-status',
  424. array(
  425. array( 'property' => 'font-size', 'value' => '2rem' ),
  426. )
  427. );
  428. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  429. '.format-link .entry-content',
  430. array(
  431. array( 'property' => 'font-size', 'value' => '21px' ),
  432. )
  433. );
  434. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  435. '.password-protected .entry-content p',
  436. array(
  437. array( 'property' => 'font-size', 'value' => '18px' ),
  438. array( 'property' => 'font-style', 'value' => 'italic' ),
  439. )
  440. );
  441. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  442. '.page-links',
  443. array(
  444. array( 'property' => 'font-family', 'value' => 'Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif' ),
  445. array( 'property' => 'font-size', 'value' => '12px' ),
  446. )
  447. );
  448. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  449. '.entry-footer',
  450. array(
  451. array( 'property' => 'font-family', 'value' => 'Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif' ),
  452. array( 'property' => 'font-size', 'value' => '14px' ),
  453. array( 'property' => 'font-weight', 'value' => 'normal' ),
  454. )
  455. );
  456. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  457. '.comment-list .comment-metadata,
  458. .comment-list .fn',
  459. array(
  460. array( 'property' => 'font-family', 'value' => 'Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif' ),
  461. array( 'property' => 'font-size', 'value' => '14px' ),
  462. array( 'property' => 'font-weight', 'value' => 'normal' ),
  463. )
  464. );
  465. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  466. '.says',
  467. array(
  468. array( 'property' => 'font-style', 'value' => 'italic' ),
  469. )
  470. );
  471. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  472. '.comment-content',
  473. array(
  474. array( 'property' => 'font-size', 'value' => '0.9em' ),
  475. )
  476. );
  477. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  478. '.comment-reply-link',
  479. array(
  480. array( 'property' => 'font-size', 'value' => '14px' ),
  481. array( 'property' => 'font-style', 'value' => 'italic' ),
  482. )
  483. );
  484. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  485. '.pingback',
  486. array(
  487. array( 'property' => 'font-size', 'value' => '0.85em' ),
  488. array( 'property' => 'font-style', 'value' => 'italic' ),
  489. )
  490. );
  491. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  492. '.form-allowed-tags,
  493. .form-allowed-tags code',
  494. array(
  495. array( 'property' => 'font-size', 'value' => '0.8em' ),
  496. )
  497. );
  498. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  499. '#footer-sidebar .widget-block',
  500. array(
  501. array( 'property' => 'font-size', 'value' => '12px' ),
  502. )
  503. );
  504. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  505. '.error404 .widget',
  506. array(
  507. array( 'property' => 'font-size', 'value' => '14px' ),
  508. )
  509. );
  510. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  511. '.error404 .widgettitle',
  512. array(
  513. array( 'property' => 'font-size', 'value' => '16px' ),
  514. )
  515. );
  516. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  517. '.widget-title',
  518. array(
  519. array( 'property' => 'font-size', 'value' => '14px' ),
  520. )
  521. );
  522. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  523. '#wp-calendar caption',
  524. array(
  525. array( 'property' => 'font-size', 'value' => '12px' ),
  526. array( 'property' => 'font-style', 'value' => 'italic' ),
  527. )
  528. );
  529. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  530. '#wp-calendar td a',
  531. array(
  532. array( 'property' => 'font-weight', 'value' => 'bold' ),
  533. )
  534. );
  535. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  536. '.screen-reader-text:active,
  537. .screen-reader-text:focus,
  538. .screen-reader-text:hover',
  539. array(
  540. array( 'property' => 'font-size', 'value' => '14px' ),
  541. array( 'property' => 'font-weight', 'value' => 'bold' ),
  542. )
  543. );
  544. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  545. '#infinite-handle span',
  546. array(
  547. array( 'property' => 'font-family', 'value' => 'Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif' ),
  548. array( 'property' => 'font-size', 'value' => '12px' ),
  549. array( 'property' => 'font-weight', 'value' => 'normal' ),
  550. )
  551. );
  552. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  553. '.sharedaddy .sd-title',
  554. array(
  555. array( 'property' => 'font-style', 'value' => 'normal' ),
  556. )
  557. );
  558. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  559. '.wp-caption-text',
  560. array(
  561. array( 'property' => 'font-size', 'value' => '16px' ),
  562. array( 'property' => 'font-style', 'value' => 'italic' ),
  563. )
  564. );
  565. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  566. '.gallery-caption',
  567. array(
  568. array( 'property' => 'font-size', 'value' => '12px' ),
  569. )
  570. );
  571. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  572. 'body',
  573. array(
  574. array( 'property' => 'font-size', 'value' => '16px' ),
  575. ),
  576. array(
  577. 'only screen and (max-width: 640px)',
  578. )
  579. );
  580. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  581. '#content',
  582. array(
  583. array( 'property' => 'font-size', 'value' => '16px' ),
  584. ),
  585. array(
  586. 'only screen and (max-width: 640px)',
  587. )
  588. );
  589. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  590. 'blockquote',
  591. array(
  592. array( 'property' => 'font-size', 'value' => '24px' ),
  593. ),
  594. array(
  595. 'only screen and (max-width: 640px)',
  596. )
  597. );
  598. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  599. '.more-link',
  600. array(
  601. array( 'property' => 'font-size', 'value' => '16px' ),
  602. ),
  603. array(
  604. 'only screen and (max-width: 640px)',
  605. )
  606. );
  607. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  608. '.entry-meta,
  609. .title-block .entry-meta',
  610. array(
  611. array( 'property' => 'font-size', 'value' => '14px' ),
  612. ),
  613. array(
  614. 'only screen and (max-width: 640px)',
  615. )
  616. );
  617. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  618. '.title-block h3',
  619. array(
  620. array( 'property' => 'font-size', 'value' => '18px' ),
  621. ),
  622. array(
  623. 'only screen and (max-width: 640px)',
  624. )
  625. );
  626. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  627. '.entry-title,
  628. .entry-title a,
  629. .title-block h1',
  630. array(
  631. array( 'property' => 'font-size', 'value' => '28px' ),
  632. ),
  633. array(
  634. 'only screen and (max-width: 640px)',
  635. )
  636. );
  637. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  638. '.menu-toggle',
  639. array(
  640. array( 'property' => 'font-size', 'value' => '21px' ),
  641. ),
  642. array(
  643. 'only screen and (max-width: 640px)',
  644. )
  645. );
  646. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  647. '#site-navigation',
  648. array(
  649. array( 'property' => 'font-size', 'value' => '16px' ),
  650. ),
  651. array(
  652. 'only screen and (max-width: 640px)',
  653. )
  654. );
  655. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  656. '#site-navigation .sub-menu li',
  657. array(
  658. array( 'property' => 'font-size', 'value' => '0.8em' ),
  659. ),
  660. array(
  661. 'only screen and (max-width: 640px)',
  662. )
  663. );
  664. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  665. '[class*="navigation"] .page-number',
  666. array(
  667. array( 'property' => 'font-size', 'value' => '20px' ),
  668. array( 'property' => 'font-weight', 'value' => 'bolder' ),
  669. ),
  670. array(
  671. 'only screen and (max-width: 640px)',
  672. )
  673. );
  674. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  675. '[class*="navigation"] .page-number span',
  676. array(
  677. array( 'property' => 'font-style', 'value' => 'italic' ),
  678. array( 'property' => 'font-weight', 'value' => 'normal' ),
  679. ),
  680. array(
  681. 'only screen and (max-width: 640px)',
  682. )
  683. );
  684. return $category_rules;
  685. } );