wpcom-colors.php 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <?php
  2. /* Custom Colors: Barnsbury */
  3. // Background Color
  4. // $config-global--color-background-default
  5. add_color_rule( 'bg', '#FFFDF6', 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. .a8c-posts-list__view-all,
  15. .a8c-posts-list__view-all:focus,
  16. .a8c-posts-list__view-all:hover,
  17. .button,
  18. .button:focus,
  19. .button:hover,
  20. .has-background-color[class],
  21. .has-focus.a8c-posts-list__view-all,
  22. .has-focus.button,
  23. .has-focus.wp-block-button__link,
  24. .has-focus.wp-block-file__button,
  25. .sticky-post,
  26. .wp-block-button__link,
  27. .wp-block-button__link:focus,
  28. .wp-block-button__link:hover,
  29. .wp-block-file .wp-block-file__button,
  30. .wp-block-file a.wp-block-file__button:active,
  31. .wp-block-file a.wp-block-file__button:focus,
  32. .wp-block-file a.wp-block-file__button:hover,
  33. .wp-block-file a.wp-block-file__button:visited,
  34. .wp-block-file__button,
  35. .wp-block-file__button:focus,
  36. .wp-block-file__button:hover,
  37. .wp-block-pullquote.is-style-solid-color,
  38. body .widget_eu_cookie_law_widget #eu-cookie-law input.accept,
  39. body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:focus,
  40. body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:hover,
  41. body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept,
  42. body .widget_eu_cookie_law_widget #eu-cookie-law.negative,
  43. button,
  44. button.has-focus,
  45. button:focus,
  46. button:hover,
  47. button[data-load-more-btn],
  48. input.has-focus[type="submit"],
  49. input:focus[type="submit"],
  50. input:hover[type="submit"],
  51. input[type="submit"],
  52. .main-navigation > div > ul > li.current-menu-item li > a,
  53. .main-navigation > div > ul > li.focus li > a,
  54. .main-navigation > div > ul > li:hover li > a', 'color' ),
  55. /**
  56. * Utility Classes
  57. */
  58. // Text-color
  59. array( '.has-primary-background-color[class],
  60. .has-secondary-background-color[class],
  61. .has-foreground-background-color[class],
  62. .has-foreground-dark-background-color[class],
  63. .has-foreground-light-background-color[class],
  64. .has-background-color[class],
  65. .has-background-dark-color[class],
  66. .has-background-light-color[class],
  67. .has-background-background-color[class],
  68. .has-background-dark-background-color[class],
  69. .has-background-light-background-color[class]', 'color' ),
  70. // Background-color
  71. array( '.has-background-background-color[class]', 'background-color' ),
  72. // Background-color darkened
  73. array( '.has-background-dark-background-color[class]', 'background-color', '-1' ),
  74. // Background-color lightened
  75. array( '.has-background-light-background-color[class]', 'background-color', '+1' ),
  76. ), __( 'Background Color' ) );
  77. // Link Color
  78. // $config-global--color-primary-default
  79. add_color_rule( 'link', '#20603C', array(
  80. // Background-color
  81. array( '.a8c-posts-list-item__featured span,
  82. .a8c-posts-list__view-all,
  83. .button,
  84. .sticky-post,
  85. .wp-block-button__link,
  86. .wp-block-file .wp-block-file__button,
  87. .wp-block-file__button,
  88. .wp-block-pullquote.is-style-solid-color,
  89. body .widget_eu_cookie_law_widget #eu-cookie-law input.accept,
  90. button,
  91. button[data-load-more-btn],
  92. input[type="submit"],
  93. .main-navigation > div > ul > li.current-menu-item li > a,
  94. .main-navigation > div > ul > li.focus li > a,
  95. .main-navigation > div > ul > li:hover li > a', 'background-color' ),
  96. // Text-color
  97. array( '.a8c-posts-list .a8c-posts-list-item__title a:active,
  98. .a8c-posts-list .a8c-posts-list-item__title a:focus,
  99. .a8c-posts-list .a8c-posts-list-item__title a:hover,
  100. .entry-footer a:active,
  101. .entry-footer a:hover,
  102. .entry-meta a:active,
  103. .entry-meta a:hover,
  104. .entry-title a:active,
  105. .entry-title a:focus,
  106. .entry-title a:hover,
  107. .footer-navigation .footer-menu a:hover,
  108. .page-title a:active,
  109. .page-title a:focus,
  110. .page-title a:hover,
  111. .site-info a:hover,
  112. .site-title a:hover,
  113. .social-navigation a:hover,
  114. .wp-block-button.is-style-outline .wp-block-button__link,
  115. .wp-block-button.is-style-outline .wp-block-button__link:active,
  116. .wp-block-button.is-style-outline.wp-block-button__link,
  117. .wp-block-button.is-style-outline.wp-block-button__link:active,
  118. .wp-block-latest-posts > li > a:active,
  119. .wp-block-latest-posts > li > a:focus,
  120. .wp-block-latest-posts > li > a:hover,
  121. .wp-block-newspack-blocks-homepage-articles article .entry-title a,
  122. .wp-block-newspack-blocks-homepage-articles article .entry-title a:active,
  123. .wp-block-newspack-blocks-homepage-articles article .entry-title a:focus,
  124. .wp-block-newspack-blocks-homepage-articles article .entry-title a:hover,
  125. a,
  126. .main-navigation > div > ul > li.current-menu-item > a,
  127. .main-navigation > div > ul > li.focus > a,
  128. .main-navigation > div > ul > li:hover > a', 'color' ),
  129. // Border color left
  130. array( '.wp-block-quote', 'border-left-color' ),
  131. // Border color right
  132. array( '.wp-block-quote[style*="text-align: right"],
  133. .wp-block-quote[style*="text-align:right"]', 'border-right-color' ),
  134. // Border color bottom
  135. array( '.main-navigation > div > ul > li.current-menu-item > ul:before,
  136. .main-navigation > div > ul > li.focus > ul:before,
  137. .main-navigation > div > ul > li:hover > ul:before', 'border-bottom-color' ),
  138. /**
  139. * Utility Classes
  140. */
  141. // Background-color
  142. array( '.has-primary-background-color[class]', 'background-color' ),
  143. // Text-color
  144. array( '.has-primary-color[class]', 'color' ),
  145. ), __( 'Link Color' ) );
  146. // Text Color
  147. // $config-global--color-foreground-default
  148. add_color_rule( 'txt', '#3C2323', array(
  149. // Text-color
  150. array( '.comment-meta .comment-metadata,
  151. .entry-footer,
  152. .entry-meta,
  153. .main-navigation,
  154. .main-navigation a,
  155. .main-navigation a:link,
  156. .main-navigation a:visited,
  157. .screen-reader-text:focus,
  158. .social-navigation a,
  159. .wp-block-code,
  160. .wp-block-code pre,
  161. .wp-block-latest-posts > li > a,
  162. .wp-block-pullquote,
  163. body,
  164. body .widget_eu_cookie_law_widget #eu-cookie-law,
  165. body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept,
  166. hr.wp-block-separator.is-style-dots:before,
  167. input[type="color"],
  168. input[type="color"]:focus,
  169. input[type="date"],
  170. input[type="date"]:focus,
  171. input[type="datetime"],
  172. input[type="datetime"]:focus,
  173. input[type="datetime-local"],
  174. input[type="datetime-local"]:focus,
  175. input[type="email"],
  176. input[type="email"]:focus,
  177. input[type="month"],
  178. input[type="month"]:focus,
  179. input[type="number"],
  180. input[type="number"]:focus,
  181. input[type="password"],
  182. input[type="password"]:focus,
  183. input[type="range"],
  184. input[type="range"]:focus,
  185. input[type="search"],
  186. input[type="search"]:focus,
  187. input[type="tel"],
  188. input[type="tel"]:focus,
  189. input[type="text"],
  190. input[type="text"]:focus,
  191. input[type="time"],
  192. input[type="time"]:focus,
  193. input[type="url"],
  194. input[type="url"]:focus,
  195. input[type="week"],
  196. input[type="week"]:focus,
  197. textarea,
  198. textarea:focus', 'color' ),
  199. // Background-color
  200. array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-color' ),
  201. // Border-color
  202. array( '.wp-block-code,
  203. body .widget_eu_cookie_law_widget #eu-cookie-law', 'border-color' ),
  204. // Border-top-color
  205. array( '.comment-list .children > li,
  206. .comment-list > li,
  207. .wp-block-pullquote', 'border-top-color' ),
  208. // Border-bottom-color
  209. array( '.comment-list,
  210. .wp-block-pullquote,
  211. hr,
  212. hr.wp-block-separator', 'border-bottom-color' ),
  213. /**
  214. * Utility Classes
  215. */
  216. // Foreground
  217. array( '.has-foreground-color[class]', 'color' ),
  218. array( '.has-foreground-background-color[class]', 'background-color' ),
  219. // Text-color darkened
  220. array( '.has-foreground-dark-color[class]', 'color', '-1' ),
  221. // Background-color darkened
  222. array( '.has-foreground-dark-background-color[class]', 'background-color', '-1' ),
  223. // Text-color brightened
  224. array( '.has-foreground-light-color[class]', 'color', '+2' ),
  225. // Background-color brightened
  226. array( '.has-foreground-light-background-color[class]', 'background-color', '+2' ),
  227. ), __( 'Text Color' ) );
  228. // Accent Color
  229. // $config-global--color-secondary-default
  230. add_color_rule( 'fg1', '#655441', array(
  231. /**
  232. * Utility Classes
  233. */
  234. // Text-color
  235. array( '.has-secondary-color[class]', 'color' ),
  236. // Background-color
  237. array( '.has-secondary-background-color[class]', 'background-color' ),
  238. ), __( 'Secondary Color' ) );