wpcom-colors.php 13 KB

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