wpcom-colors.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. <?php
  2. add_color_rule( 'bg', '#ffffff', array(
  3. // #ffffff
  4. array(
  5. 'body,
  6. button:active,
  7. input[type="button"]:active,
  8. input[type="reset"]:active,
  9. input[type="submit"]:active,
  10. button:focus,
  11. input[type="button"]:focus,
  12. input[type="reset"]:focus,
  13. input[type="submit"]:focus,
  14. button:hover,
  15. input[type="button"]:hover,
  16. input[type="reset"]:hover,
  17. input[type="submit"]:hover,
  18. input[type="text"],
  19. input[type="email"],
  20. input[type="url"],
  21. input[type="password"],
  22. input[type="search"],
  23. textarea,
  24. .menu-toggle,
  25. .dropdown-toggle,
  26. .main-navigation.toggled > div,
  27. .comment-navigation a,
  28. .posts-navigation a,
  29. .sidebar-toggle,
  30. .site-header,
  31. .search-toggled .site-header:before,
  32. .search-toggle,
  33. .search-header .search-form,
  34. .search-form:before,
  35. .page-links a,
  36. .post-link .genericon,
  37. .comment-list .comment-reply-title small,
  38. #infinite-handle span button,
  39. #infinite-handle span button:active,
  40. #infinite-handle span button:focus,
  41. #infinite-handle span button:hover,
  42. #infinite-footer,
  43. body.long-menu .main-navigation > div:before,
  44. .main-navigation.toggled > div,
  45. .main-navigation ul ul,
  46. .main-navigation ul ul li,
  47. #comments #respond #comment-form-comment,
  48. #comments #comment-form-share-text-padder,
  49. #comments #respond .comment-form-fields div.comment-form-input,
  50. #comments .comment #respond #comment-form-comment,
  51. #comments .comment #comment-form-share-text-padder,
  52. #comments .comment #respond .comment-form-fields div.comment-form-input,
  53. .widget_akismet_widget .a-stats a:active,
  54. .widget_akismet_widget .a-stats a:focus,
  55. .widget_akismet_widget .a-stats a:hover', 'background-color'
  56. ),
  57. array(
  58. 'mark,
  59. ins,
  60. button,
  61. input[type="button"],
  62. input[type="reset"],
  63. input[type="submit"],
  64. .comment-navigation a:active,
  65. .comment-navigation a:focus,
  66. .comment-navigation a:hover,
  67. .posts-navigation a:active,
  68. .posts-navigation a:focus,
  69. .posts-navigation a:hover,
  70. .sticky-post,
  71. body:not(.single) .content-area .format-link,
  72. .content-area .format-link .entry-title a,
  73. .content-area .format-link .entry-title + .entry-meta,
  74. .content-area .format-link .entry-title + .entry-meta a,
  75. .bypostauthor .fn,
  76. #infinite-handle span button:active,
  77. #infinite-handle span button:focus,
  78. #infinite-handle span button:hover,
  79. .widget_akismet_widget .a-stats a', 'color'
  80. ),
  81. // #555555
  82. array(
  83. 'blockquote', 'color', 'bg', 6.35
  84. ),
  85. // #777777
  86. array(
  87. 'caption,
  88. .social-navigation a,
  89. .post-navigation .meta-nav,
  90. .widget_recent_entries .post-date,
  91. .widget_rss cite,
  92. .widget_rss .rss-date,
  93. .site-info,
  94. .site-info a,
  95. .footer-text,
  96. .content-area .entry-meta,
  97. .content-area .entry-meta a,
  98. .entry-footer,
  99. .entry-footer a,
  100. .page-links,
  101. .page-links > .page-links-title,
  102. .author-info .author-title,
  103. .comment-list .comment-reply-title small,
  104. .comment-metadata,
  105. .comment-reply-link,
  106. .comment-metadata a,
  107. .comment-list .comment-reply-title small a,
  108. .wp-caption,
  109. .gallery-caption,
  110. .site-content .jetpack-recipe .jetpack-recipe-meta,
  111. #infinite-footer,
  112. .hentry div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post-context,
  113. .widget_goodreads div[class^="gr_custom_author"]', 'color', 'bg', 4.3
  114. ),
  115. // #aaaaaa
  116. array(
  117. '.site-info .sep', 'color', 'bg', 2.1
  118. ),
  119. // #dddddd
  120. array(
  121. 'hr,
  122. .page .widget-area:before,
  123. .single .widget-area:before,
  124. body:not(.long-menu) .site-branding:before,
  125. .comment-list:before,
  126. .comment-navigation + .comment-respond:before,
  127. div#jp-relatedposts:before', 'background-color', 'bg', 1.34
  128. ),
  129. array(
  130. 'input[type="text"],
  131. input[type="email"],
  132. input[type="url"],
  133. input[type="password"],
  134. input[type="search"],
  135. textarea,
  136. .menu-toggle,
  137. .menu-toggle:active,
  138. .menu-toggle:focus,
  139. .menu-toggle:hover,
  140. .dropdown-toggle,
  141. .dropdown-toggle:active,
  142. .dropdown-toggle:focus,
  143. .dropdown-toggle:hover,
  144. .main-navigation.toggled > div,
  145. .sidebar-toggle,
  146. .sidebar-toggle:active,
  147. .sidebar-toggle:focus,
  148. .sidebar-toggle:hover,
  149. .author-info,
  150. .search-toggle,
  151. .search-toggle:active,
  152. .search-toggle:focus,
  153. .search-toggle:hover,
  154. .search-form .search-submit,
  155. .search-form .search-submit:active,
  156. .search-form .search-submit:focus,
  157. .search-form .search-submit:hover,
  158. .page-links a,
  159. .page-links > span,
  160. .page-links a:active,
  161. .page-links a:focus,
  162. .page-links a:hover,
  163. .main-navigation ul ul,
  164. #comments #respond #comment-form-comment,
  165. #comments #comment-form-share-text-padder,
  166. #comments #respond .comment-form-fields div.comment-form-input,
  167. .widget.top_rated .pd_top_rated_holder_posts > p,
  168. .widget.top_rated ul', 'border-color', 'bg', 1.34
  169. ),
  170. array(
  171. 'th,
  172. td,
  173. .footer-widget-inner .widget,
  174. .site-header,
  175. .comment-list', 'border-bottom-color', 'bg', 1.34
  176. ),
  177. array(
  178. 'body:not(.long-menu) .main-navigation,
  179. .page .widget-area,
  180. .single .widget-area,
  181. .rtl.page .site-main,
  182. .rtl.single .site-main', 'border-left-color', 'bg', 1.34
  183. ),
  184. array(
  185. '.page .site-main,
  186. .single .site-main,
  187. .rtl .search-form .search-field,
  188. body.rtl:not(.long-menu) .main-navigation,
  189. .rtl.page .widget-area,
  190. .rtl.single .widget-area', 'border-right-color', 'bg', 1.34
  191. ),
  192. array(
  193. 'table,
  194. .comment-navigation + .comment-respond,
  195. .footer-widget,
  196. .site-footer,
  197. .comments-area,
  198. #infinite-footer,
  199. div#jp-relatedposts', 'border-top-color', 'bg', 1.34
  200. ),
  201. array(
  202. 'blockquote:before', 'color', 'bg', 1.34
  203. ),
  204. // #eeeeee
  205. array(
  206. 'pre,
  207. thead,
  208. a:focus,
  209. .menu-toggle:active,
  210. .menu-toggle:focus,
  211. .menu-toggle:hover,
  212. .dropdown-toggle:active,
  213. .dropdown-toggle:focus,
  214. .dropdown-toggle:hover,
  215. .post-navigation a:active,
  216. .post-navigation a:focus,
  217. .post-navigation a:hover,
  218. .sidebar-toggle:active,
  219. .sidebar-toggle:focus,
  220. .sidebar-toggle:hover,
  221. .search-toggle:active,
  222. .search-toggle:focus,
  223. .search-toggle:hover,
  224. .search-form.hover:before,
  225. .page-links a,
  226. .page-links > span,
  227. .page-links a:active,
  228. .page-links a:focus,
  229. .page-links a:hover,
  230. .footer-text + .social-navigation:before', 'background-color', 'bg', 1.12
  231. ),
  232. array(
  233. '.comment-navigation a,
  234. .posts-navigation a,
  235. .post-navigation a,
  236. .gallery,
  237. #infinite-handle span button', 'border-color', 'bg', 1.12
  238. ),
  239. array(
  240. '.main-navigation ul,
  241. .social-navigation,
  242. .widget_archive ul,
  243. .widget_categories ul,
  244. .widget_links ul,
  245. .widget_meta ul,
  246. .widget_nav_menu ul,
  247. .widget_pages ul,
  248. .widget_recent_comments ul,
  249. .widget_recent_entries ul,
  250. .widget_rss ul,
  251. .footer-text,
  252. .page-header,
  253. .entry-footer > span:last-of-type,
  254. .comment-list .comment:not(:last-of-type),
  255. .comment-list .depth-1:not(:last-of-type),
  256. .sd-like.jetpack-likes-widget-wrapper,
  257. .sd-rating,
  258. .sd-sharing-enabled:not(#jp-post-flair),
  259. .widget_goodreads div[class^="gr_custom_each_container"]:last-of-type,
  260. .widget_rss_links ul,
  261. .widget_rss_links p:last-of-type,
  262. .hentry .wpcom-reblog-snapshot .reblogger-note,
  263. .widget_authors ul,
  264. .widget_jp_blogs_i_follow ol,
  265. .widget_blog-stats ul,
  266. .widget_top-clicks ul,
  267. .widget_top-posts ul,
  268. .widget.top_rated ul,
  269. .widget_upcoming_events_widget ul,
  270. .widget_recent_comments tr,
  271. .widget_recent_comments td', 'border-bottom-color', 'bg', 1.12
  272. ),
  273. array(
  274. '.main-navigation .nav-menu > li + li', 'border-left-color', 'bg', 1.12
  275. ),
  276. array(
  277. '.rtl .main-navigation .nav-menu > li + li', 'border-right-color', 'bg', 1.12
  278. ),
  279. array(
  280. '.main-navigation li,
  281. .posts-navigation,
  282. .widget_archive li,
  283. .widget_categories li,
  284. .widget_links li,
  285. .widget_meta li,
  286. .widget_nav_menu li,
  287. .widget_pages li,
  288. .widget_recent_comments li,
  289. .widget_recent_entries li,
  290. .widget_rss li,
  291. .archive .hentry,
  292. .blog .hentry,
  293. .search .hentry,
  294. .entry-meta + .entry-meta,
  295. .entry-footer .byline,
  296. .entry-footer .cat-links,
  297. .entry-footer .comments-link,
  298. .entry-footer .edit-link,
  299. .entry-footer .posted-on,
  300. .entry-footer .tags-links,
  301. .page-links,
  302. .archive .format-aside .entry-meta:last-of-type,
  303. .blog .format-aside .entry-meta:last-of-type,
  304. .search .format-aside .entry-meta:last-of-type,
  305. .comment-list .comment .comment:first-of-type,
  306. .comment-list .comment-respond,
  307. #infinite-handle,
  308. .infinite-loader,
  309. .widget_goodreads div[class^="gr_custom_each_container"],
  310. .widget_rss_links li,
  311. .widget_rss_links p,
  312. .widget_authors li,
  313. .widget_jp_blogs_i_follow li,
  314. .widgets-list-layout li,
  315. .widget_top-clicks li,
  316. .widget_top-posts li,
  317. .widget.top_rated li,
  318. .widget_upcoming_events_widget li,
  319. .widget_recent_comments table', 'border-top-color', 'bg', 1.12
  320. ),
  321. array(
  322. 'div#jp-relatedposts a:focus', 'outline-color', 'bg', 1.12
  323. ),
  324. ), __( 'Background' ) );
  325. add_color_rule( 'link', '#3863c1', array(
  326. array(
  327. 'mark,
  328. ins,
  329. button,
  330. input[type="button"],
  331. input[type="reset"],
  332. input[type="submit"],
  333. .comment-navigation a:active,
  334. .comment-navigation a:focus,
  335. .comment-navigation a:hover,
  336. .posts-navigation a:active,
  337. .posts-navigation a:focus,
  338. .posts-navigation a:hover,
  339. .featured-content .hentry:not(.has-post-thumbnail):hover .post-thumbnail,
  340. .featured-content .hentry:not(.has-post-thumbnail) .post-thumbnail:focus,
  341. .sticky-post,
  342. .content-area .format-link .entry-summary,
  343. body:not(.single) .content-area .format-link .entry-title,
  344. .content-area .format-link .entry-title + .entry-meta,
  345. .post-link,
  346. .bypostauthor .fn,
  347. #infinite-handle span button:active,
  348. #infinite-handle span button:focus,
  349. #infinite-handle span button:hover,
  350. .widget_akismet_widget .a-stats a,
  351. .milestone-widget .milestone-header', 'background-color', 'bg', 2
  352. ),
  353. array(
  354. 'button,
  355. input[type="button"],
  356. input[type="reset"],
  357. input[type="submit"],
  358. .comment-navigation a:active,
  359. .comment-navigation a:focus,
  360. .comment-navigation a:hover,
  361. .posts-navigation a:active,
  362. .posts-navigation a:focus,
  363. .posts-navigation a:hover,
  364. #infinite-handle span button:active,
  365. #infinite-handle span button:focus,
  366. #infinite-handle span button:hover,
  367. .widget_akismet_widget .a-stats a', 'border-color', 'bg', 2
  368. ),
  369. array(
  370. 'pre', 'border-left-color', 'bg', 2
  371. ),
  372. array(
  373. '.rtl pre', 'border-right-color', 'bg', 2
  374. ),
  375. array(
  376. 'button:active,
  377. input[type="button"]:active,
  378. input[type="reset"]:active,
  379. input[type="submit"]:active,
  380. button:focus,
  381. input[type="button"]:focus,
  382. input[type="reset"]:focus,
  383. input[type="submit"]:focus,
  384. button:hover,
  385. input[type="button"]:hover,
  386. input[type="reset"]:hover,
  387. input[type="submit"]:hover,
  388. a,
  389. .menu-toggle,
  390. .menu-toggle:active,
  391. .menu-toggle:focus,
  392. .menu-toggle:hover,
  393. .dropdown-toggle,
  394. .dropdown-toggle:active,
  395. .dropdown-toggle:focus,
  396. .dropdown-toggle:hover,
  397. .main-navigation a:active,
  398. .main-navigation a:focus,
  399. .main-navigation a:hover,
  400. .main-navigation .current_page_item > a,
  401. .main-navigation .current-menu-item > a,
  402. .main-navigation .current_page_ancestor > a,
  403. .social-navigation a:active,
  404. .social-navigation a:focus,
  405. .social-navigation a:hover,
  406. .comment-navigation a,
  407. .posts-navigation a,
  408. .post-navigation a:active .post-title,
  409. .post-navigation a:focus .post-title,
  410. .post-navigation a:hover .post-title,
  411. .sidebar-toggle,
  412. .sidebar-toggle:active,
  413. .sidebar-toggle:focus,
  414. .sidebar-toggle:hover,
  415. .search-toggle,
  416. .search-toggle:active,
  417. .search-toggle:focus,
  418. .search-toggle:hover,
  419. .search-form:before,
  420. .site-title,
  421. .site-info a:active,
  422. .site-info a:focus,
  423. .site-info a:hover,
  424. .page-links > span,
  425. .page-links a:active,
  426. .page-links a:focus,
  427. .page-links a:hover,
  428. .post-link .genericon,
  429. .required,
  430. .site-content .contact-form label span,
  431. #infinite-handle span button,
  432. #infinite-footer .blog-info a,
  433. #infinite-footer .blog-credits a:active,
  434. #infinite-footer .blog-credits a:focus,
  435. #infinite-footer .blog-credits a:hover,
  436. .widget_goodreads div[class^="gr_custom_title"] a,
  437. .main-navigation .menu-item-has-children > a:after,
  438. #comments #respond .comment-form-service a,
  439. .widget_akismet_widget .a-stats a:active,
  440. .widget_akismet_widget .a-stats a:focus,
  441. .widget_akismet_widget .a-stats a:hover,
  442. .widget_akismet_widget .a-stats a:active .count,
  443. .widget_akismet_widget .a-stats a:focus .count,
  444. .widget_akismet_widget .a-stats a:hover .count,
  445. .widget_authors > ul > li > a:active,
  446. .widget_authors > ul > li > a:focus,
  447. .widget_authors > ul > li > a:hover', 'color', 'bg', 2
  448. ),
  449. ), __( 'Accent' ) );
  450. add_color_rule( 'extra', '#222222', array(
  451. array(
  452. '.sticky-post:active,
  453. .sticky-post:focus,
  454. .sticky-post:hover', 'background-color', 'bg', 21
  455. ),
  456. array(
  457. 'abbr,
  458. acronym', 'border-bottom-color', 'bg', 21
  459. ),
  460. array(
  461. 'body,
  462. button,
  463. input,
  464. select,
  465. textarea,
  466. .main-navigation a,
  467. .post-navigation a,
  468. .widget_tag_cloud a:before,
  469. .site-title a:active,
  470. .site-title a:focus,
  471. .site-title a:hover,
  472. .content-area .entry-meta a:active,
  473. .content-area .entry-meta a:focus,
  474. .content-area .entry-meta a:hover,
  475. .entry-footer a:active,
  476. .entry-footer a:focus,
  477. .entry-footer a:hover,
  478. .page-links a,
  479. .comment-list .comment-reply-title small a:active,
  480. .comment-list .comment-reply-title small a:focus,
  481. .comment-list .comment-reply-title small a:hover,
  482. .comment-metadata a:active,
  483. .comment-metadata a:focus,
  484. .comment-metadata a:hover,
  485. .comment-reply-link:active,
  486. .comment-reply-link:focus,
  487. .comment-reply-link:hover,
  488. #infinite-footer .blog-info a:active,
  489. #infinite-footer .blog-info a:focus,
  490. #infinite-footer .blog-info a:hover,
  491. .widget_goodreads div[class^="gr_custom_title"] a:active,
  492. .widget_goodreads div[class^="gr_custom_title"] a:focus,
  493. .widget_goodreads div[class^="gr_custom_title"] a:hover,
  494. .widget_goodreads div[class^="gr_custom_container"] div[class^="gr_custom_author"] a:active,
  495. .widget_goodreads div[class^="gr_custom_container"] div[class^="gr_custom_author"] a:focus,
  496. .widget_goodreads div[class^="gr_custom_container"] div[class^="gr_custom_author"] a:hover,
  497. #comments #respond .comment-form-fields p.comment-form-posting-as,
  498. #comments #respond .comment-form-fields p.comment-form-log-out,
  499. #comments #respond #comment-form-identity #comment-form-nascar p,
  500. #comments #respond #comment-form-load-service p,
  501. #comments #respond #comment-form-comment textarea,
  502. #comments #comment-form-share-text-padder textarea,
  503. #comments #respond .comment-form-fields label,
  504. #comments #respond .comment-form-fields label span.required,
  505. #comments #respond .comment-form-fields label span.nopublish,
  506. #comments #respond .comment-form-fields div.comment-form-input input,
  507. #comments #respond .comment-form-service a:active,
  508. #comments #respond .comment-form-service a:focus,
  509. #comments #respond .comment-form-service a:hover,
  510. .widget_authors > ul > li > a,
  511. .wp_widget_tag_cloud a:before', 'color', 'bg', 7
  512. ),
  513. array(
  514. '::input-placeholder', 'color', 'bg', 7
  515. ),
  516. array(
  517. '::-webkit-input-placeholder', 'color', 'bg', 7
  518. ),
  519. array(
  520. ':-moz-placeholder', 'color', 'bg', 7
  521. ),
  522. array(
  523. '::-moz-placeholder', 'color', 'bg', 7
  524. ),
  525. array(
  526. '::-ms-input-placeholder', 'color', 'bg', 7
  527. ),
  528. ) );
  529. /* Extra CSS */
  530. function gazette_extra_css() { ?>
  531. #comments #respond p.form-submit input#comment-submit,
  532. .widget_flickr #flickr_badge_uber_wrapper td a:last-child {
  533. background: #222 !important;
  534. border-color: #222 !important;
  535. }
  536. #comments #respond .form-submit input#comment-submit:active,
  537. #comments #respond .form-submit input#comment-submit:focus,
  538. #comments #respond .form-submit input#comment-submit:hover,
  539. .widget_flickr #flickr_badge_uber_wrapper td a:last-child:active,
  540. .widget_flickr #flickr_badge_uber_wrapper td a:last-child:focus,
  541. .widget_flickr #flickr_badge_uber_wrapper td a:last-child:hover {
  542. background: #fff !important;
  543. color: #222 !important;
  544. }
  545. <?php
  546. }
  547. add_theme_support( 'custom_colors_extra_css', 'gazette_extra_css' );
  548. /* Additional color palettes */
  549. add_color_palette( array(
  550. '#ffffff',
  551. '',
  552. '#e80832',
  553. '',
  554. '',
  555. ), 'White and Red' );
  556. add_color_palette( array(
  557. '#ffffff',
  558. '',
  559. '#2ec9b9',
  560. '',
  561. '',
  562. ), 'White and Turquoise' );
  563. add_color_palette( array(
  564. '#ffffff',
  565. '',
  566. '#ef7aa5',
  567. '',
  568. '',
  569. ), 'White and Pink' );
  570. add_color_palette( array(
  571. '#e4e5e6',
  572. '',
  573. '#e58338',
  574. '',
  575. '',
  576. ), 'Light Grey and Orange' );
  577. add_color_palette( array(
  578. '#6c797c',
  579. '',
  580. '#8ed03c',
  581. '',
  582. '',
  583. ), 'Dark Grey and Lime' );
  584. add_color_palette( array(
  585. '#222222',
  586. '',
  587. '#3863c1',
  588. '',
  589. '',
  590. ), 'Black and Blue' );