wpcom-colors.php 12 KB

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