jetpack-fonts.php 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920
  1. <?php
  2. add_filter( 'typekit_add_font_category_rules', function( $category_rules ) {
  3. TypekitTheme::add_font_category_rule( $category_rules, 'none',
  4. 'html',
  5. array(
  6. array( 'property' => 'font-family', 'value' => 'sans-serif' ),
  7. )
  8. );
  9. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  10. 'b,
  11. strong',
  12. array(
  13. array( 'property' => 'font-weight', 'value' => '700' ),
  14. )
  15. );
  16. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  17. 'dfn',
  18. array(
  19. array( 'property' => 'font-style', 'value' => 'italic' ),
  20. )
  21. );
  22. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  23. 'small',
  24. array(
  25. array( 'property' => 'font-size', 'value' => '0.8em' ),
  26. )
  27. );
  28. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  29. 'sub,
  30. sup',
  31. array(
  32. array( 'property' => 'font-size', 'value' => '0.75em' ),
  33. )
  34. );
  35. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  36. 'code,
  37. kbd,
  38. pre,
  39. samp',
  40. array(
  41. array( 'property' => 'font-family', 'value' => 'Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace' ),
  42. array( 'property' => 'font-size', 'value' => '1em' ),
  43. )
  44. );
  45. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  46. 'optgroup',
  47. array(
  48. array( 'property' => 'font-weight', 'value' => '700' ),
  49. )
  50. );
  51. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  52. 'body',
  53. array(
  54. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  55. array( 'property' => 'font-size', 'value' => '19px' ),
  56. )
  57. );
  58. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  59. 'button,
  60. input,
  61. select',
  62. array(
  63. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  64. array( 'property' => 'font-size', 'value' => '19px' ),
  65. )
  66. );
  67. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  68. 'textarea',
  69. array(
  70. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  71. array( 'property' => 'font-size', 'value' => '19px' ),
  72. )
  73. );
  74. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  75. 'select',
  76. array(
  77. array( 'property' => 'font-size', 'value' => '13px' ),
  78. )
  79. );
  80. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  81. '#tinymce h1,
  82. #tinymce h2,
  83. #tinymce h3,
  84. #tinymce h4,
  85. #tinymce h5,
  86. #tinymce h6,
  87. .comment-content h1,
  88. .comment-content h2,
  89. .comment-content h3,
  90. .comment-content h4,
  91. .comment-content h5,
  92. .comment-content h6,
  93. .entry-content h1,
  94. .entry-content h2,
  95. .entry-content h3,
  96. .entry-content h4,
  97. .entry-content h5,
  98. .entry-content h6,
  99. .entry-summary h1,
  100. .entry-summary h2,
  101. .entry-summary h3,
  102. .entry-summary h4,
  103. .entry-summary h5,
  104. .entry-summary h6,
  105. .widget_text h1,
  106. .widget_text h2,
  107. .widget_text h3,
  108. .widget_text h4,
  109. .widget_text h5,
  110. .widget_text h6',
  111. array(
  112. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  113. )
  114. );
  115. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  116. 'h1',
  117. array(
  118. array( 'property' => 'font-size', 'value' => '47px' ),
  119. )
  120. );
  121. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  122. 'h2',
  123. array(
  124. array( 'property' => 'font-size', 'value' => '31px' ),
  125. )
  126. );
  127. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  128. 'h3',
  129. array(
  130. array( 'property' => 'font-size', 'value' => '24px' ),
  131. )
  132. );
  133. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  134. 'h4',
  135. array(
  136. array( 'property' => 'font-size', 'value' => '20px' ),
  137. )
  138. );
  139. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  140. 'h5',
  141. array(
  142. array( 'property' => 'font-size', 'value' => '15px' ),
  143. )
  144. );
  145. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  146. 'h6',
  147. array(
  148. array( 'property' => 'font-size', 'value' => '14px' ),
  149. )
  150. );
  151. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  152. 'dt',
  153. array(
  154. array( 'property' => 'font-weight', 'value' => '700' ),
  155. )
  156. );
  157. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  158. 'cite,
  159. dfn,
  160. em,
  161. i',
  162. array(
  163. array( 'property' => 'font-style', 'value' => 'italic' ),
  164. )
  165. );
  166. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  167. 'blockquote',
  168. array(
  169. array( 'property' => 'font-family', 'value' => 'Georgia, "Times New Roman", serif' ),
  170. array( 'property' => 'font-style', 'value' => 'italic' ),
  171. )
  172. );
  173. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  174. 'blockquote cite',
  175. array(
  176. array( 'property' => 'font-size', 'value' => '0.8em' ),
  177. array( 'property' => 'font-weight', 'value' => 'bold' ),
  178. )
  179. );
  180. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  181. 'blockquote cite:before',
  182. array(
  183. array( 'property' => 'font-weight', 'value' => 'normal' ),
  184. )
  185. );
  186. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  187. 'blockquote h1,
  188. blockquote h2,
  189. blockquote h3,
  190. blockquote h4',
  191. array(
  192. array( 'property' => 'font-family', 'value' => 'inherit' ),
  193. array( 'property' => 'font-weight', 'value' => 'normal' ),
  194. )
  195. );
  196. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  197. 'code,
  198. kbd,
  199. pre,
  200. tt,
  201. var',
  202. array(
  203. array( 'property' => 'font-family', 'value' => 'Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace' ),
  204. array( 'property' => 'font-size', 'value' => '16px' ),
  205. )
  206. );
  207. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  208. 'sub,
  209. sup',
  210. array(
  211. array( 'property' => 'font-size', 'value' => '0.75em' ),
  212. )
  213. );
  214. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  215. 'big',
  216. array(
  217. array( 'property' => 'font-size', 'value' => '1.25em' ),
  218. )
  219. );
  220. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  221. 'table',
  222. array(
  223. array( 'property' => 'font-size', 'value' => '0.9em' ),
  224. )
  225. );
  226. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  227. 'caption,
  228. td,
  229. th',
  230. array(
  231. array( 'property' => 'font-weight', 'value' => 'normal' ),
  232. )
  233. );
  234. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  235. 'th',
  236. array(
  237. array( 'property' => 'font-weight', 'value' => '700' ),
  238. )
  239. );
  240. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  241. '.button,
  242. .more-link,
  243. button:not(.menu-toggle),
  244. input[type="button"],
  245. input[type="reset"],
  246. input[type="submit"],
  247. .posts-navigation .nav-links a,
  248. #content #infinite-handle span button',
  249. array(
  250. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  251. array( 'property' => 'font-size', 'value' => '15px' ),
  252. array( 'property' => 'font-style', 'value' => 'normal' ),
  253. array( 'property' => 'font-weight', 'value' => '400' ),
  254. )
  255. );
  256. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  257. 'input[type="email"],
  258. input[type="password"],
  259. input[type="search"],
  260. input[type="text"],
  261. input[type="url"],
  262. textarea',
  263. array(
  264. array( 'property' => 'font-family', 'value' => 'Georgia, "Times New Roman", serif' ),
  265. )
  266. );
  267. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  268. 'input[type="file"]',
  269. array(
  270. array( 'property' => 'font-size', 'value' => '16px' ),
  271. )
  272. );
  273. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  274. '.menu-toggle',
  275. array(
  276. array( 'property' => 'font-size', 'value' => '17px' ),
  277. array( 'property' => 'font-weight', 'value' => '700' ),
  278. )
  279. );
  280. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  281. '#primary-menu > li a',
  282. array(
  283. array( 'property' => 'font-size', 'value' => '16px' ),
  284. array( 'property' => 'font-weight', 'value' => '700' ),
  285. )
  286. );
  287. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  288. '.posts-navigation .nav-links a',
  289. array(
  290. array( 'property' => 'font-size', 'value' => '15px' ),
  291. )
  292. );
  293. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  294. '.post-navigation',
  295. array(
  296. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  297. )
  298. );
  299. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  300. '.post-navigation .nav-links',
  301. array(
  302. array( 'property' => 'font-size', 'value' => '15px' ),
  303. )
  304. );
  305. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  306. '.post-navigation .nav-links a',
  307. array(
  308. array( 'property' => 'font-weight', 'value' => 'normal' ),
  309. )
  310. );
  311. TypekitTheme::add_font_category_rule( $category_rules, 'none',
  312. '.post-navigation .nav-links .nav-next a:after,
  313. .post-navigation .nav-links .nav-previous a:before',
  314. array(
  315. array( 'property' => 'font-family', 'value' => '\'Genericons\'' ),
  316. )
  317. );
  318. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  319. '.menu-toggle',
  320. array(
  321. array( 'property' => 'font-weight', 'value' => '700' ),
  322. )
  323. );
  324. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  325. '.main-navigation',
  326. array(
  327. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  328. )
  329. );
  330. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  331. '.main-navigation > ul li',
  332. array(
  333. array( 'property' => 'font-size', 'value' => '16px' ),
  334. array( 'property' => 'font-weight', 'value' => '700' ),
  335. )
  336. );
  337. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  338. '.main-navigation > ul li a',
  339. array(
  340. array( 'property' => 'font-weight', 'value' => '700' ),
  341. )
  342. );
  343. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  344. '.screen-reader-text:focus',
  345. array(
  346. array( 'property' => 'font-size', 'value' => '14px' ),
  347. array( 'property' => 'font-weight', 'value' => '700' ),
  348. )
  349. );
  350. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  351. '.entry-content,
  352. .entry-summary',
  353. array(
  354. array( 'property' => 'font-size', 'value' => '19px' ),
  355. )
  356. );
  357. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  358. '.entry-content,
  359. .entry-summary,
  360. .page-content',
  361. array(
  362. array( 'property' => 'font-family', 'value' => 'Georgia, "Times New Roman", serif' ),
  363. )
  364. );
  365. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  366. '.entry-content .subtitle',
  367. array(
  368. array( 'property' => 'font-family', 'value' => 'Georgia, "Times New Roman", serif' ),
  369. array( 'property' => 'font-size', 'value' => '1.3em' ),
  370. array( 'property' => 'font-style', 'value' => 'italic' ),
  371. array( 'property' => 'font-weight', 'value' => 'normal' ),
  372. )
  373. );
  374. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  375. 'div#jp-relatedposts h3.jp-relatedposts-headline em',
  376. array(
  377. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  378. )
  379. );
  380. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  381. '.format-quote .entry-content blockquote,
  382. .format-quote .entry-summary blockquote',
  383. array(
  384. array( 'property' => 'font-size', 'value' => '24px' ),
  385. )
  386. );
  387. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  388. '.format-status .entry-content,
  389. .format-status .entry-summary',
  390. array(
  391. array( 'property' => 'font-style', 'value' => 'italic' ),
  392. )
  393. );
  394. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  395. '.format-status .post-edit-link',
  396. array(
  397. array( 'property' => 'font-style', 'value' => 'normal' ),
  398. )
  399. );
  400. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  401. '.wp-caption-dd,
  402. .wp-caption-text',
  403. array(
  404. array( 'property' => 'font-size', 'value' => '0.75em' ),
  405. array( 'property' => 'font-style', 'value' => 'italic' ),
  406. array( 'property' => 'font-weight', 'value' => '400' ),
  407. )
  408. );
  409. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  410. '#comments',
  411. array(
  412. array( 'property' => 'font-family', 'value' => 'Georgia, "Times New Roman", serif' ),
  413. )
  414. );
  415. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  416. '.comment-reply-title,
  417. .comments-title',
  418. array(
  419. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  420. array( 'property' => 'font-size', 'value' => '26px' ),
  421. array( 'property' => 'font-weight', 'value' => '700' ),
  422. )
  423. );
  424. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  425. 'body:not(.highlander-enabled) .comment-reply-title small:before',
  426. array(
  427. array( 'property' => 'font-size', 'value' => '14px' ),
  428. )
  429. );
  430. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  431. '.pingback,
  432. .trackback',
  433. array(
  434. array( 'property' => 'font-size', 'value' => '17px' ),
  435. )
  436. );
  437. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  438. '.pingback:before,
  439. .trackback:before',
  440. array(
  441. array( 'property' => 'font-size', 'value' => '1.3em' ),
  442. )
  443. );
  444. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  445. '.pingback span.edit-link,
  446. .trackback span.edit-link',
  447. array(
  448. array( 'property' => 'font-size', 'value' => '0.875em' ),
  449. )
  450. );
  451. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  452. '.comment',
  453. array(
  454. array( 'property' => 'font-size', 'value' => '17px' ),
  455. )
  456. );
  457. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  458. '.comment .comment-reply-link',
  459. array(
  460. array( 'property' => 'font-size', 'value' => '15px' ),
  461. )
  462. );
  463. TypekitTheme::add_font_category_rule( $category_rules, 'none',
  464. '.comment .comment-reply-link:before',
  465. array(
  466. array( 'property' => 'font-family', 'value' => '\'Genericons\'' ),
  467. array( 'property' => 'font-size', 'value' => '14px' ),
  468. )
  469. );
  470. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  471. '.comment .comment-meta',
  472. array(
  473. array( 'property' => 'font-size', 'value' => '12px' ),
  474. )
  475. );
  476. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  477. '.comment .comment-meta .comment-author .fn',
  478. array(
  479. array( 'property' => 'font-size', 'value' => '16px' ),
  480. )
  481. );
  482. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  483. '.comment-awaiting-moderation',
  484. array(
  485. array( 'property' => 'font-size', 'value' => '1.1em' ),
  486. array( 'property' => 'font-style', 'value' => 'italic' ),
  487. )
  488. );
  489. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  490. '.comment-form input[type="email"],
  491. .comment-form input[type="password"],
  492. .comment-form input[type="search"],
  493. .comment-form input[type="text"],
  494. .comment-form input[type="url"]',
  495. array(
  496. array( 'property' => 'font-size', 'value' => '17px' ),
  497. )
  498. );
  499. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  500. '.comment-form textarea',
  501. array(
  502. array( 'property' => 'font-size', 'value' => '17px' ),
  503. )
  504. );
  505. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  506. '.comment-form label',
  507. array(
  508. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  509. array( 'property' => 'font-size', 'value' => '15px' ),
  510. )
  511. );
  512. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  513. '.comment-form span.required',
  514. array(
  515. array( 'property' => 'font-family', 'value' => 'sans-serif' ),
  516. array( 'property' => 'font-size', 'value' => '29px' ),
  517. )
  518. );
  519. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  520. '.comment-form .logged-in-as',
  521. array(
  522. array( 'property' => 'font-size', 'value' => '15px' ),
  523. )
  524. );
  525. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  526. '.comment-form .comment-notes',
  527. array(
  528. array( 'property' => 'font-size', 'value' => '16px' ),
  529. )
  530. );
  531. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  532. '#cancel-comment-reply-link',
  533. array(
  534. array( 'property' => 'font-size', 'value' => '14px' ),
  535. array( 'property' => 'font-weight', 'value' => 'normal' ),
  536. )
  537. );
  538. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  539. '.widget-area',
  540. array(
  541. array( 'property' => 'font-size', 'value' => '15px' ),
  542. )
  543. );
  544. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  545. '.page-content > .widget .widget-title,
  546. .page-content > .widget .widgettitle',
  547. array(
  548. array( 'property' => 'font-size', 'value' => '34px' ),
  549. array( 'property' => 'font-weight', 'value' => 'bold' ),
  550. )
  551. );
  552. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  553. '.widget .widget-title',
  554. array(
  555. array( 'property' => 'font-size', 'value' => '16px' ),
  556. array( 'property' => 'font-weight', 'value' => 'bold' ),
  557. )
  558. );
  559. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  560. '.widget_rss .rss-date,
  561. .widget_rss li > cite',
  562. array(
  563. array( 'property' => 'font-size', 'value' => '12px' ),
  564. )
  565. );
  566. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  567. '.widget_recent_comments a,
  568. .widget_recent_entries a',
  569. array(
  570. array( 'property' => 'font-size', 'value' => '14px' ),
  571. array( 'property' => 'font-weight', 'value' => 'bold' ),
  572. )
  573. );
  574. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  575. '.widget_recent_entries',
  576. array(
  577. array( 'property' => 'font-size', 'value' => '13px' ),
  578. )
  579. );
  580. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  581. '.widget_recent_entries span.post-date',
  582. array(
  583. array( 'property' => 'font-family', 'value' => 'Georgia, "Times New Roman", serif' ),
  584. array( 'property' => 'font-size', 'value' => '0.9em' ),
  585. array( 'property' => 'font-style', 'value' => 'italic' ),
  586. )
  587. );
  588. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  589. '.site-description',
  590. array(
  591. array( 'property' => 'font-family', 'value' => 'Georgia, "Times New Roman", serif' ),
  592. array( 'property' => 'font-size', 'value' => '16px' ),
  593. array( 'property' => 'font-style', 'value' => 'italic' ),
  594. array( 'property' => 'font-weight', 'value' => 'inherit' ),
  595. )
  596. );
  597. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  598. '.image-post-title',
  599. array(
  600. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  601. array( 'property' => 'font-size', 'value' => '16px' ),
  602. array( 'property' => 'font-weight', 'value' => '700' ),
  603. )
  604. );
  605. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  606. '.site-posted-on strong',
  607. array(
  608. array( 'property' => 'font-size', 'value' => '14px' ),
  609. array( 'property' => 'font-style', 'value' => 'normal' ),
  610. array( 'property' => 'font-weight', 'value' => '700' ),
  611. )
  612. );
  613. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  614. '.site-posted-on time',
  615. array(
  616. array( 'property' => 'font-family', 'value' => 'Georgia, "Times New Roman", serif' ),
  617. array( 'property' => 'font-size', 'value' => '12px' ),
  618. array( 'property' => 'font-style', 'value' => 'normal' ),
  619. array( 'property' => 'font-weight', 'value' => 'inherit' ),
  620. )
  621. );
  622. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  623. '.page-header:not(.page-header-light) h1',
  624. array(
  625. array( 'property' => 'font-size', 'value' => '41px' ),
  626. )
  627. );
  628. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  629. '.page-header:not(.page-header-light) .taxonomy-description',
  630. array(
  631. array( 'property' => 'font-family', 'value' => 'Georgia, "Times New Roman", serif' ),
  632. )
  633. );
  634. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  635. '.not-found .page-header-light .page-title',
  636. array(
  637. array( 'property' => 'font-size', 'value' => '47px' ),
  638. )
  639. );
  640. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  641. '.archive .archive-title,
  642. .archive .page-title,
  643. .search .page-title',
  644. array(
  645. array( 'property' => 'font-size', 'value' => '3.5em' ),
  646. )
  647. );
  648. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  649. '.entry-title',
  650. array(
  651. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  652. array( 'property' => 'font-size', 'value' => '2.2em' ),
  653. )
  654. );
  655. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  656. '.light-text',
  657. array(
  658. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  659. array( 'property' => 'font-size', 'value' => '13px' ),
  660. array( 'property' => 'font-style', 'value' => 'normal' ),
  661. array( 'property' => 'font-weight', 'value' => '400' ),
  662. )
  663. );
  664. TypekitTheme::add_font_category_rule( $category_rules, 'none',
  665. '.light-text > a:before,
  666. .light-text > span:before',
  667. array(
  668. array( 'property' => 'font-family', 'value' => '\'Genericons\'' ),
  669. array( 'property' => 'font-size', 'value' => '1.2em' ),
  670. )
  671. );
  672. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  673. '.light-text .full-size-link:before',
  674. array(
  675. array( 'property' => 'font-size', 'value' => '1.25em' ),
  676. )
  677. );
  678. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  679. '.light-text .word-count:before',
  680. array(
  681. array( 'property' => 'font-size', 'value' => '1.8em' ),
  682. )
  683. );
  684. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  685. '.site-info',
  686. array(
  687. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  688. array( 'property' => 'font-size', 'value' => '14px' ),
  689. )
  690. );
  691. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  692. '.sticky-label',
  693. array(
  694. array( 'property' => 'font-size', 'value' => '16px' ),
  695. array( 'property' => 'font-weight', 'value' => 'bold' ),
  696. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  697. )
  698. );
  699. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  700. '.post-details,
  701. .post-details a',
  702. array(
  703. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  704. array( 'property' => 'font-size', 'value' => '14px' ),
  705. array( 'property' => 'font-style', 'value' => 'normal' ),
  706. array( 'property' => 'font-weight', 'value' => '400' ),
  707. )
  708. );
  709. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  710. '.post-tags',
  711. array(
  712. array( 'property' => 'font-weight', 'value' => '700' ),
  713. )
  714. );
  715. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  716. '.post-tags li',
  717. array(
  718. array( 'property' => 'font-size', 'value' => '15px' ),
  719. array( 'property' => 'font-weight', 'value' => '400' ),
  720. )
  721. );
  722. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  723. '.post-tags li:first-child',
  724. array(
  725. array( 'property' => 'font-weight', 'value' => '700' ),
  726. )
  727. );
  728. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  729. '.page-links',
  730. array(
  731. array( 'property' => 'font-family', 'value' => 'Georgia, "Times New Roman", serif' ),
  732. )
  733. );
  734. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  735. '.post-edit-link',
  736. array(
  737. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  738. array( 'property' => 'font-size', 'value' => '15px' ),
  739. )
  740. );
  741. TypekitTheme::add_font_category_rule( $category_rules, 'none',
  742. '.post-edit-link a:before',
  743. array(
  744. array( 'property' => 'font-family', 'value' => '\'Genericons\'' ),
  745. )
  746. );
  747. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  748. '#post-cover-image .cover-meta .single-post-title',
  749. array(
  750. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  751. array( 'property' => 'font-size', 'value' => '42px' ),
  752. )
  753. );
  754. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  755. '#hero-header .site-title',
  756. array(
  757. array( 'property' => 'font-family', 'value' => '-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif' ),
  758. array( 'property' => 'font-size', 'value' => '41px' ),
  759. )
  760. );
  761. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  762. '#hero-header .site-description',
  763. array(
  764. array( 'property' => 'font-size', 'value' => '16px' ),
  765. )
  766. );
  767. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  768. '#hero-header .social-navigation ul.menu li a:before',
  769. array(
  770. array( 'property' => 'font-size', 'value' => '27px' ),
  771. )
  772. );
  773. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  774. '.post-author-card .author.vcard',
  775. array(
  776. array( 'property' => 'font-size', 'value' => '18px' ),
  777. array( 'property' => 'font-weight', 'value' => '700' ),
  778. )
  779. );
  780. TypekitTheme::add_font_category_rule( $category_rules, 'body-text',
  781. '.post-author-card .author-description',
  782. array(
  783. array( 'property' => 'font-family', 'value' => 'Georgia, "Times New Roman", serif' ),
  784. array( 'property' => 'font-size', 'value' => '14px' ),
  785. array( 'property' => 'font-style', 'value' => 'italic' ),
  786. )
  787. );
  788. TypekitTheme::add_font_category_rule( $category_rules, 'none',
  789. '.social-navigation li a:before',
  790. array(
  791. array( 'property' => 'font-family', 'value' => '\'Genericons\'' ),
  792. array( 'property' => 'font-size', 'value' => '26px' ),
  793. )
  794. );
  795. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  796. '.site-header .site-title',
  797. array(
  798. array( 'property' => 'font-size', 'value' => '19px' ),
  799. )
  800. );
  801. TypekitTheme::add_font_category_rule( $category_rules, 'headings',
  802. '.site-header .site-description',
  803. array(
  804. array( 'property' => 'font-size', 'value' => '13px' ),
  805. )
  806. );
  807. return $category_rules;
  808. } );