wpcom-colors.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. <?php
  2. /* Custom Colors: Exford */
  3. // Background Color
  4. // $config-global--color-background-default
  5. add_color_rule( 'bg', '#FFFFFF', array(
  6. // Background-color
  7. array( '.screen-reader-text:focus,
  8. body,
  9. body .widget_eu_cookie_law_widget #eu-cookie-law,
  10. body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept,
  11. .main-navigation > div > ul > li > .sub-menu', 'background-color' ),
  12. // Text-color
  13. array( '.a8c-posts-list-item__featured span,
  14. .sticky-post,
  15. .wp-block-cover-image.has-background-dim,
  16. .wp-block-cover.has-background-dim,
  17. .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover-image-text,
  18. .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover-text,
  19. .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover__inner-container,
  20. .wp-block-cover:not([class*="background-color"]) .wp-block-cover-image-text,
  21. .wp-block-cover:not([class*="background-color"]) .wp-block-cover-text,
  22. .wp-block-cover:not([class*="background-color"]) .wp-block-cover__inner-container,
  23. .wp-block-pullquote.is-style-solid-color,
  24. body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'color' ),
  25. /**
  26. * Utility Classes
  27. */
  28. // Text-color
  29. array( '.has-background-color[class],
  30. .has-background-dim[class],
  31. .has-foreground-background-color[class],
  32. .has-foreground-background-color.has-background-dim[class],
  33. .has-foreground-dark-background-color[class],
  34. .has-foreground-dark-background-color.has-background-dim[class],
  35. .has-foreground-light-background-color[class],
  36. .has-foreground-light-background-color.has-background-dim[class],
  37. .has-primary-background-color[class],
  38. .has-primary-background-color.has-background-dim[class],
  39. .has-secondary-background-color[class],
  40. .has-secondary-background-color.has-background-dim[class]', 'color' ),
  41. // Background-color
  42. array( '.has-background-background-color[class],
  43. .has-background-background-color.has-background-dim[class]', 'background-color' ),
  44. // Text-color darkened
  45. array( '.has-background-dark-color[class]', 'color', '-1' ),
  46. // Background-color darkened
  47. array( '.has-background-dark-background-color[class],
  48. .has-background-dark-background-color.has-background-dim[class]', 'background-color', '-1' ),
  49. // Text-color lightened
  50. array( '.has-background-light-color[class]', 'color', '+1' ),
  51. // Background-color lightened
  52. array( '.has-background-light-background-color[class],
  53. .has-background-light-background-color.has-background-dim[class]', 'background-color', '+1' ),
  54. /**
  55. * Grays
  56. * Uses a slightly darker color
  57. */
  58. // Border-color
  59. array( '.wp-block-code,
  60. body .widget_eu_cookie_law_widget #eu-cookie-law,
  61. input[type="color"],
  62. input[type="date"],
  63. input[type="datetime"],
  64. input[type="datetime-local"],
  65. input[type="email"],
  66. input[type="month"],
  67. input[type="number"],
  68. input[type="password"],
  69. input[type="range"],
  70. input[type="search"],
  71. input[type="tel"],
  72. input[type="text"],
  73. input[type="time"],
  74. input[type="url"],
  75. input[type="week"],
  76. select,
  77. textarea,
  78. .site-header > *.main-navigation > div > ul > li > .sub-menu', 'border-color', '-1' ),
  79. // Border-top-color
  80. array( '.comment-list .children > li,
  81. .comment-list > li,
  82. .wp-block-pullquote', 'border-top-color', '-1' ),
  83. // Border-bottom-color
  84. array( '.comment-list,
  85. .wp-block-pullquote,
  86. hr,
  87. hr.wp-block-separator', 'border-bottom-color', '-1' ),
  88. // Color
  89. array( 'hr.wp-block-separator.is-style-dots:before', 'color', '-1' ),
  90. // Background-color
  91. array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept.has-focus,
  92. body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept:focus,
  93. body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept:hover', '-1' ),
  94. ), __( 'Background Color' ) );
  95. // Link Color
  96. // $config-global--color-primary-default
  97. add_color_rule( 'link', '#23883D', array(
  98. // Background-color
  99. array( '.a8c-posts-list-item__featured span,
  100. .a8c-posts-list__view-all,
  101. .button,
  102. .sticky-post,
  103. .wp-block-button__link,
  104. .wp-block-file .wp-block-file__button,
  105. .wp-block-file__button,
  106. .wp-block-pullquote.is-style-solid-color,
  107. body .widget_eu_cookie_law_widget #eu-cookie-law input.accept,
  108. button,
  109. button[data-load-more-btn],
  110. input[type="submit"]', 'background-color' ),
  111. // Text-color
  112. array( '.a8c-posts-list .a8c-posts-list-item__title a:active,
  113. .a8c-posts-list .a8c-posts-list-item__title a:focus,
  114. .a8c-posts-list .a8c-posts-list-item__title a:hover,
  115. .entry-title a:active,
  116. .entry-title a:focus,
  117. .entry-title a:hover,
  118. .main-navigation a,
  119. .main-navigation a:link,
  120. .main-navigation a:visited,
  121. .page-title a:active,
  122. .page-title a:focus,
  123. .page-title a:hover,
  124. .site-title a:hover,
  125. .social-navigation a:hover,
  126. .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
  127. .wp-block-button.is-style-outline .wp-block-button__link:active,
  128. .wp-block-button.is-style-outline.wp-block-button__link:not(.has-text-color),
  129. .wp-block-button.is-style-outline.wp-block-button__link:active,
  130. .wp-block-newspack-blocks-homepage-articles article .entry-title a,
  131. .wp-block-newspack-blocks-homepage-articles article .entry-title a:active,
  132. .wp-block-newspack-blocks-homepage-articles article .entry-title a:focus,
  133. .wp-block-newspack-blocks-homepage-articles article .entry-title a:hover,
  134. a', 'color' ),
  135. // Border color left
  136. array( '.wp-block-quote', 'border-left-color' ),
  137. // Border color right
  138. array( '.wp-block-quote[style*="text-align: right"],
  139. .wp-block-quote[style*="text-align:right"]', 'border-right-color' ),
  140. /**
  141. * Utility Classes
  142. */
  143. // Background-color
  144. array( '.has-primary-background-color[class],
  145. .has-primary-background-color.has-background-dim[class]', 'background-color' ),
  146. // Text-color
  147. array( '.has-primary-color[class]', 'color' ),
  148. ), __( 'Link Color' ) );
  149. // Text Color
  150. // $config-global--color-foreground-default
  151. add_color_rule( 'txt', '#111111', array(
  152. // Text-color
  153. array( '.comment-meta .comment-metadata,
  154. .main-navigation,
  155. .screen-reader-text:focus,
  156. .site-title,
  157. .social-navigation a,
  158. .wp-block-code,
  159. .wp-block-code pre,
  160. .wp-block-pullquote,
  161. body,
  162. body .widget_eu_cookie_law_widget #eu-cookie-law,
  163. body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept,
  164. .wp-block-table.is-style-stripes tbody tr:nth-child(odd),
  165. table.is-style-stripes tbody tr:nth-child(odd)', 'color' ),
  166. // Background-color
  167. array( '.wp-block-cover,
  168. .wp-block-cover-image,
  169. .wp-block-cover-image.has-background-dim,
  170. .wp-block-cover.has-background-dim,
  171. body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-color' ),
  172. /**
  173. * Utility Classes
  174. */
  175. // Foreground
  176. array( '.has-background-background-color[class],
  177. .has-background-background-color.has-background-dim[class],
  178. .has-background-dark-background-color[class],
  179. .has-background-dark-background-color.has-background-dim[class],
  180. .has-background-light-background-color[class],
  181. .has-background-light-background-color.has-background-dim[class],
  182. .has-foreground-color[class]', 'color' ),
  183. // Background-color
  184. array( '.has-background-dim[class],
  185. .has-foreground-background-color[class],
  186. .has-foreground-background-color.has-background-dim[class]', 'background-color' ),
  187. // Text-color darkened
  188. array( '.has-foreground-dark-color[class]', 'color', '-1' ),
  189. // Background-color darkened
  190. array( '.has-foreground-dark-background-color[class],
  191. .has-foreground-dark-background-color.has-background-dim[class]', 'background-color', '-1' ),
  192. // Text-color brightened
  193. array( '.has-foreground-light-color[class]', 'color', '+2' ),
  194. // Background-color brightened
  195. array( '.has-foreground-light-background-color[class],
  196. .has-foreground-light-background-color.has-background-dim[class]', 'background-color', '+2' ),
  197. /*
  198. * Gray (Same as text color)
  199. */
  200. // Text color
  201. array( '.a8c-posts-list__item .a8c-posts-list-item__meta,
  202. .comment-notes,
  203. .entry-footer,
  204. .entry-meta,
  205. .footer-navigation .footer-menu,
  206. .post-navigation .meta-nav,
  207. .site-branding,
  208. .site-info,
  209. .widget_archive ul li,
  210. .widget_authors ul li,
  211. .widget_categories ul li,
  212. .widget_jp_blogs_i_follow ul li,
  213. .widget_links ul li,
  214. .widget_meta ul li,
  215. .widget_nav_menu ul li,
  216. .widget_pages ul li,
  217. .widget_recent_comments ul li,
  218. .widget_recent_entries ul li,
  219. .widget_rss ul li,
  220. .widget_rss_links ul li,
  221. .widget_top-click ul li,
  222. .widget_top-posts ul li,
  223. .widget_upcoming_events_widget ul li,
  224. .wp-block-image figcaption,
  225. .wp-block-latest-comments .wp-block-latest-comments__comment-date,
  226. .wp-block-latest-posts .wp-block-latest-posts__post-date,
  227. .wp-block-newspack-blocks-homepage-articles article .cat-links,
  228. .wp-block-newspack-blocks-homepage-articles article .entry-meta,
  229. .wp-block-pullquote .wp-block-pullquote__citation,
  230. .wp-block-pullquote cite,
  231. .wp-block-pullquote footer,
  232. .wp-block-quote .wp-block-quote__citation,
  233. .wp-block-quote cite,
  234. .wp-block-quote footer,
  235. .wp-block-quote.is-large .wp-block-quote__citation,
  236. .wp-block-quote.is-large cite,
  237. .wp-block-quote.is-large footer,
  238. .wp-block-quote.is-style-large .wp-block-quote__citation,
  239. .wp-block-quote.is-style-large cite,
  240. .wp-block-quote.is-style-large footer,
  241. .wp-block-video figcaption,
  242. figcaption', 'color', '+2' ),
  243. // Text color
  244. array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'border-color', '-1' ),
  245. ), __( 'Text Color' ) );
  246. // Accent Color
  247. // $config-global--color-secondary-default
  248. add_color_rule( 'fg1', '#0963C4', array(
  249. // Background-color
  250. array( '.a8c-posts-list__view-all:focus,
  251. .a8c-posts-list__view-all:hover,
  252. .button:focus,
  253. .button:hover,
  254. .has-focus.a8c-posts-list__view-all,
  255. .has-focus.button,
  256. .has-focus.wp-block-button__link,
  257. .has-focus.wp-block-file__button,
  258. .main-navigation #toggle:focus + #toggle-menu,
  259. .wp-block-button__link:focus,
  260. .wp-block-button__link:hover,
  261. .wp-block-file__button:focus,
  262. .wp-block-file__button:hover,
  263. body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:focus,
  264. body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:hover,
  265. body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept,
  266. button.has-focus,
  267. button:focus,
  268. button:hover,
  269. input.has-focus[type="submit"],
  270. input:focus[type="submit"],
  271. input:hover[type="submit"]', 'background-color' ),
  272. // Color
  273. array( '.a8c-posts-list__item .a8c-posts-list-item__meta a:active,
  274. .a8c-posts-list__item .a8c-posts-list-item__meta a:hover,
  275. .comment-meta .comment-metadata a:active,
  276. .comment-meta .comment-metadata a:hover,
  277. .entry-footer a:active,
  278. .entry-footer a:hover,
  279. .entry-meta a:active,
  280. .entry-meta a:hover,
  281. .footer-navigation .footer-menu a:hover,
  282. .main-navigation a:hover,
  283. .site-info a:hover,
  284. .wp-block-button.is-style-outline .wp-block-button__link.has-focus,
  285. .wp-block-button.is-style-outline .wp-block-button__link:focus,
  286. .wp-block-button.is-style-outline .wp-block-button__link:hover,
  287. .wp-block-button.is-style-outline.wp-block-button__link.has-focus,
  288. .wp-block-button.is-style-outline.wp-block-button__link:focus,
  289. .wp-block-button.is-style-outline.wp-block-button__link:hover,
  290. .wp-block-newspack-blocks-homepage-articles article .cat-links a:active,
  291. .wp-block-newspack-blocks-homepage-articles article .cat-links a:hover,
  292. .wp-block-newspack-blocks-homepage-articles article .entry-meta a:active,
  293. .wp-block-newspack-blocks-homepage-articles article .entry-meta a:hover,
  294. .wp-block-newspack-blocks-homepage-articles article .entry-title a:hover,
  295. a:hover', 'color' ),
  296. // Border-color
  297. array( 'input[type="color"]:focus,
  298. input[type="date"]:focus,
  299. input[type="datetime"]:focus,
  300. input[type="datetime-local"]:focus,
  301. input[type="email"]:focus,
  302. input[type="month"]:focus,
  303. input[type="number"]:focus,
  304. input[type="password"]:focus,
  305. input[type="range"]:focus,
  306. input[type="search"]:focus,
  307. input[type="tel"]:focus,
  308. input[type="text"]:focus,
  309. input[type="time"]:focus,
  310. input[type="url"]:focus,
  311. input[type="week"]:focus,
  312. textarea:focus', 'border-color' ),
  313. /**
  314. * Utility Classes
  315. */
  316. // Text-color
  317. array( '.has-secondary-color[class]', 'color' ),
  318. // Background-color
  319. array( '.has-secondary-background-color[class],
  320. .has-secondary-background-color.has-background-dim[class]', 'background-color' ),
  321. ), __( 'Secondary Color' ) );
  322. /**
  323. * Featured Varia Palettes
  324. */
  325. // Light
  326. add_color_palette( array(
  327. '#FFFFFF',
  328. '#1D1E1E',
  329. '#C8133E',
  330. '#4E2F4B',
  331. ), 'Light' );
  332. // Medium
  333. add_color_palette( array(
  334. '#EEF4F7',
  335. '#242527',
  336. '#35845D',
  337. '#233252',
  338. ), 'Medium' );
  339. // Dark
  340. add_color_palette( array(
  341. '#1F2527',
  342. '#FFFFFF',
  343. '#9FD3E8',
  344. '#FBE6AA',
  345. ), 'Dark' );