wpcom-colors.php 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. <?php
  2. add_color_rule( 'bg', '#ffffff', array(
  3. array(
  4. 'body', 'background-color', '#222222', 17
  5. ),
  6. ), __( 'Background' ) );
  7. add_color_rule( 'link', '#ef7d0b', array(
  8. array(
  9. 'mark,
  10. ins,
  11. button,
  12. input[type="button"],
  13. input[type="reset"],
  14. input[type="submit"]', 'background-color', '#ffffff', 3
  15. ),
  16. array(
  17. '.search-form:before,
  18. a,
  19. .post-navigation a:active .post-title,
  20. .post-navigation a:focus .post-title,
  21. .post-navigation a:hover .post-title,
  22. .site-title a:active,
  23. .site-title a:focus,
  24. .site-title a:hover,
  25. .entry-title a:active,
  26. .entry-title a:focus,
  27. .entry-title a:hover,
  28. .comment-author a:active,
  29. .comment-author a:focus,
  30. .comment-author a:hover,
  31. .required,
  32. .site-content .contact-form label span,
  33. #comments #respond .comment-form-service a,
  34. #comments #respond .comment-form-service a', 'color', '#ffffff', 3
  35. ),
  36. ), __( 'Accent' ) );
  37. add_color_rule( 'fg1', '#222222', array(
  38. // #111111
  39. array(
  40. '.widget tfoot,
  41. .widget thead,
  42. .dropdown-toggle:active,
  43. .dropdown-toggle:focus,
  44. .dropdown-toggle:hover,
  45. .main-navigation a:active,
  46. .main-navigation a:focus,
  47. .main-navigation a:hover,
  48. .social-navigation a:active,
  49. .social-navigation a:focus,
  50. .social-navigation a:hover', 'background-color', 'fg1', 1.05
  51. ),
  52. // #222222
  53. array(
  54. '.widget input[type="text"]:focus,
  55. .widget input[type="email"]:focus,
  56. .widget input[type="url"]:focus,
  57. .widget input[type="password"]:focus,
  58. .widget input[type="search"]:focus,
  59. .widget textarea:focus,
  60. .widget .search-form.hover:before,
  61. .slide-menu,
  62. .menu-open,
  63. .menu-toggle,
  64. .menu-toggle.toggled,
  65. .dropdown-toggle,
  66. .main-navigation ul ul.toggled:before,
  67. .widget-area,
  68. .site-footer,
  69. #infinite-footer,
  70. .site:before', 'background-color', '#ffffff', 1.5
  71. ),
  72. array(
  73. '.widget button:active,
  74. .widget button:focus,
  75. .widget button:hover,
  76. .widget input[type="button"]:active,
  77. .widget input[type="button"]:focus,
  78. .widget input[type="button"]:hover,
  79. .widget input[type="reset"]:active,
  80. .widget input[type="reset"]:focus,
  81. .widget input[type="reset"]:hover,
  82. .widget input[type="submit"]:active,
  83. .widget input[type="submit"]:focus,
  84. .widget input[type="submit"]:hover,
  85. .widget_akismet_widget .a-stats a:active,
  86. .widget_akismet_widget .a-stats a:focus,
  87. .widget_akismet_widget .a-stats a:hover', 'color', '#ffffff', 1.5
  88. ),
  89. // #333333
  90. array(
  91. '.widget code,
  92. .widget kbd,
  93. .widget pre,
  94. .widget tt,
  95. .widget var,
  96. .widget tr:nth-of-type(even),
  97. .widget input[type="text"],
  98. .widget input[type="email"],
  99. .widget input[type="url"],
  100. .widget input[type="password"],
  101. .widget input[type="search"],
  102. .widget textarea,
  103. .widget .search-form:before,
  104. .social-navigation:before,
  105. .social-navigation:after,
  106. .widget-column:after,
  107. .widget-column + .widget-column:before', 'background-color', 'fg1', 1.2
  108. ),
  109. array(
  110. '.widget-grofile .grofile-thumbnail,
  111. .widget_author_grid img,
  112. .widget_authors img,
  113. .widget_gravatar img,
  114. .widgets-grid-layout img,
  115. .widgets-multi-column-grid img,
  116. .widget_recent_comments img', 'border-color', 'fg1', 1.2
  117. ),
  118. array(
  119. '.main-navigation > div > ul > li:last-child,
  120. .widget,
  121. .widget .wp-caption', 'border-bottom-color', 'fg1', 1.2
  122. ),
  123. array(
  124. '.main-navigation ul ul.toggled', 'border-left-color', 'fg1', 1.2
  125. ),
  126. array(
  127. '.rtl .main-navigation ul ul.toggled', 'border-right-color', 'fg1', 1.2
  128. ),
  129. array(
  130. '.main-navigation li,
  131. .main-navigation ul ul.toggled,
  132. .site-footer,
  133. #infinite-footer,
  134. .slide-wrapper + .widget-area', 'border-top-color', 'fg1', 1.2
  135. ),
  136. array(
  137. '.slide-menu,
  138. .menu-toggle.toggled,
  139. .dropdown-toggle,
  140. .dropdown-toggle:active,
  141. .dropdown-toggle:focus,
  142. .dropdown-toggle:hover,
  143. .social-navigation a', 'outline-color', 'fg1', 1.2
  144. ),
  145. // #444444
  146. array(
  147. '.widget hr,
  148. .menu-toggle:active,
  149. .menu-toggle:focus,
  150. .menu-toggle:hover,
  151. .widget_categories .children:before,
  152. .widget_nav_menu .sub-menu:before,
  153. .widget_pages .children:before,
  154. .menu-toggle.toggled:active,
  155. .menu-toggle.toggled:focus,
  156. .menu-toggle.toggled:hover,
  157. .widget_authors ul ul:before', 'background-color', 'fg1', 1.55
  158. ),
  159. array(
  160. '.widget input[type="text"],
  161. .widget input[type="email"],
  162. .widget input[type="url"],
  163. .widget input[type="password"],
  164. .widget input[type="search"],
  165. .widget textarea,
  166. .widget .search-form .search-submit,
  167. .widget .search-form .search-submit:active,
  168. .widget .search-form .search-submit:focus,
  169. .widget .search-form .search-submit:hover,
  170. .menu-toggle.toggled:active,
  171. .menu-toggle.toggled:focus,
  172. .menu-toggle.toggled:hover,
  173. .widget.top_rated .pd_top_rated_holder_posts > p,
  174. .widget.top_rated ul', 'border-color', 'fg1', 1.55
  175. ),
  176. array(
  177. '.widget th,
  178. .widget td,
  179. .widget_archive ul,
  180. .widget_categories ul,
  181. .widget_links ul,
  182. .widget_meta ul,
  183. .widget_nav_menu ul,
  184. .widget_pages ul,
  185. .widget_recent_comments ul,
  186. .widget_recent_entries ul,
  187. .widget_rss ul,
  188. .widget_goodreads div[class^="gr_custom_each_container"]:last-of-type,
  189. .widget-grofile .grofile-links,
  190. .widget_rss_links ul,
  191. .widget_rss_links p:last-of-type,
  192. .widget_authors ul,
  193. .widget_jp_blogs_i_follow ol,
  194. .widget_top-clicks ul,
  195. .widget_top-posts ul,
  196. .widget.top_rated ul,
  197. .widget_upcoming_events_widget ul,
  198. .widget_recent_comments tr,
  199. .widget_recent_comments td', 'border-bottom-color', 'fg1', 1.55
  200. ),
  201. array(
  202. '.widget table,
  203. .widget_archive li,
  204. .widget_categories li,
  205. .widget_links li,
  206. .widget_meta li,
  207. .widget_nav_menu li,
  208. .widget_pages li,
  209. .widget_recent_comments li,
  210. .widget_recent_entries li,
  211. .widget_rss li,
  212. .widget_goodreads div[class^="gr_custom_each_container"],
  213. .widget-grofile .grofile-links li,
  214. .widget_rss_links li,
  215. .widget_rss_links p,
  216. .widget_authors li,
  217. .widget_jp_blogs_i_follow li,
  218. .widgets-list-layout li,
  219. .widget_top-clicks li,
  220. .widget_top-posts li,
  221. .widget.top_rated li,
  222. .widget_upcoming_events_widget li,
  223. .widget_recent_comments table', 'border-top-color', 'fg1', 1.55
  224. ),
  225. // #cccccc
  226. array(
  227. '.widget blockquote,
  228. .widget caption,
  229. .widget .wp-caption', 'color', 'fg1', 9.3
  230. ),
  231. ), __( 'Sidebar' ) );
  232. add_color_rule( 'fg2', '#ef7d0b', array(
  233. array(
  234. '.widget mark,
  235. .widget ins,
  236. .widget button,
  237. .widget input[type="button"],
  238. .widget input[type="reset"],
  239. .widget input[type="submit"],
  240. .widget-grofile .grofile-full-link,
  241. .widget_akismet_widget .a-stats a,
  242. .milestone-widget .milestone-header', 'background-color', 'fg1', 3
  243. ),
  244. array(
  245. '.widget .search-form:before,
  246. .widget a,
  247. .menu-toggle:hover,
  248. .menu-toggle.toggled:hover,
  249. .dropdown-toggle:hover,
  250. .main-navigation a:hover,
  251. .main-navigation .current_page_item > a,
  252. .main-navigation .current-menu-item > a,
  253. .main-navigation .current_page_ancestor > a,
  254. .social-navigation a:hover,
  255. .widget_goodreads div[class^="gr_custom_title"] a,
  256. .widget_goodreads div[class^="gr_custom_container"] div[class^="gr_custom_author"] a:active,
  257. .widget_goodreads div[class^="gr_custom_container"] div[class^="gr_custom_author"] a:focus,
  258. .widget_goodreads div[class^="gr_custom_container"] div[class^="gr_custom_author"] a:hover,
  259. .widget_flickr #flickr_badge_uber_wrapper td a:last-child', 'color', 'fg1', 3
  260. ),
  261. ), __( 'Sidebar Accent' ) );
  262. /* Extra CSS */
  263. function publication_extra_css() { ?>
  264. #comments #respond p.form-submit input#comment-submit {
  265. background: #222 !important;
  266. }
  267. #comments #respond .form-submit input#comment-submit:active,
  268. #comments #respond .form-submit input#comment-submit:focus,
  269. #comments #respond .form-submit input#comment-submit:hover {
  270. background: #777 !important;
  271. }
  272. <?php
  273. }
  274. add_theme_support( 'custom_colors_extra_css', 'publication_extra_css' );
  275. /* Additional color palettes */
  276. add_color_palette( array(
  277. '#ffffff',
  278. '',
  279. '#539d30',
  280. '#222222',
  281. '#539d30',
  282. ), 'Green and Black' );
  283. add_color_palette( array(
  284. '#ffffff',
  285. '',
  286. '#d91e1b',
  287. '#222222',
  288. '#d91e1b',
  289. ), 'Red and Black' );
  290. add_color_palette( array(
  291. '#ffffff',
  292. '',
  293. '#377feb',
  294. '#222222',
  295. '#377feb',
  296. ), 'Blue and Black' );
  297. add_color_palette( array(
  298. '#ffffff',
  299. '',
  300. '#0000cc',
  301. '#bbbbbb',
  302. '#cc0000',
  303. ), 'Blue, Light Grey and Red' );
  304. add_color_palette( array(
  305. '#ffffff',
  306. '',
  307. '#ff0080',
  308. '#59507b',
  309. '#97ebdd',
  310. ), 'Pink, Purple and Aqua' );
  311. add_color_palette( array(
  312. '#ffffff',
  313. '',
  314. '#1376b7',
  315. '#27394e',
  316. '#10cfa9',
  317. ), 'Blue, Dark Blue and Turquoise' );