wpcom-editor-colors.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <?php
  2. /*
  3. * Custom Editor Colors: Brompton
  4. */
  5. // Background Color (White)
  6. // $config-global--color-background-default
  7. add_editor_color_rule( 'bg', '#E8E4DD', array(
  8. // Text-color
  9. array( '#editor .editor-styles-wrapper .button,
  10. #editor .editor-styles-wrapper .button.has-focus,
  11. #editor .editor-styles-wrapper .button:focus,
  12. #editor .editor-styles-wrapper .button:hover,
  13. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button,
  14. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:focus,
  15. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:hover,
  16. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .has-focus.button,
  17. #editor .editor-styles-wrapper .wp-block-button:not(.is-style-button) .wp-block-button__link,
  18. #editor .editor-styles-wrapper .wp-block-button:not(.is-style-button) .wp-block-button__link.has-focus,
  19. #editor .editor-styles-wrapper .wp-block-button:not(.is-style-button) .wp-block-button__link:focus,
  20. #editor .editor-styles-wrapper .wp-block-button:not(.is-style-button) .wp-block-button__link:hover,
  21. #editor .editor-styles-wrapper .wp-block-search .wp-block-search__button,
  22. #editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'color' ),
  23. // Color
  24. array( 'hr.wp-block-separator.is-style-dots:before', 'color', '-1' ),
  25. // Text-color
  26. array( '#editor .editor-styles-wrapper', 'background-color' ),
  27. /**
  28. * Utility Classes
  29. */
  30. // Text-color
  31. array( '#editor .editor-styles-wrapper .has-background-color,
  32. #editor .editor-styles-wrapper .has-foreground-background-color,
  33. #editor .editor-styles-wrapper .has-foreground-dark-background-color,
  34. #editor .editor-styles-wrapper .has-foreground-light-background-color,
  35. #editor .editor-styles-wrapper .has-primary-background-color,
  36. #editor .editor-styles-wrapper .has-secondary-background-color,
  37. #editor .editor-styles-wrapper .wp-block .has-background-color,
  38. #editor .editor-styles-wrapper .wp-block .has-foreground-background-color,
  39. #editor .editor-styles-wrapper .wp-block .has-foreground-dark-background-color,
  40. #editor .editor-styles-wrapper .wp-block .has-foreground-light-background-color,
  41. #editor .editor-styles-wrapper .wp-block .has-primary-background-color,
  42. #editor .editor-styles-wrapper .wp-block .has-secondary-background-color', 'color' ),
  43. // Background-color
  44. array( '#editor .editor-styles-wrapper .has-background-background-color,
  45. #editor .editor-styles-wrapper .wp-block .has-background-background-color', 'background-color' ),
  46. // Text-color darkened
  47. array( '#editor .editor-styles-wrapper .has-background-dark-color,
  48. #editor .editor-styles-wrapper .wp-block .has-background-dark-color', 'color', '-1' ),
  49. // Background-color darkened
  50. array( '#editor .editor-styles-wrapper .has-background-dark-background-color,
  51. #editor .editor-styles-wrapper .wp-block .has-background-dark-background-color', 'background-color', '-1' ),
  52. // Text-color lightened
  53. array( '#editor .editor-styles-wrapper .has-background-light-color,
  54. #editor .editor-styles-wrapper .wp-block .has-background-light-color', 'color', '+1' ),
  55. // Background-color lightened
  56. array( '#editor .editor-styles-wrapper .has-background-light-background-color,
  57. #editor .editor-styles-wrapper .wp-block .has-background-light-background-color', 'background-color', '+1' ),
  58. ), __( 'Background Color' ) );
  59. // Link Color (Blue)
  60. // $config-global--color-primary-default
  61. add_editor_color_rule( 'link', '#C04239', array(
  62. // Text-color
  63. array( '#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a,
  64. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a:hover,
  65. #editor .editor-styles-wrapper a', 'color' ),
  66. // Background-color
  67. array( '#editor .editor-styles-wrapper .button.has-focus,
  68. #editor .editor-styles-wrapper .button:focus,
  69. #editor .editor-styles-wrapper .button:hover,
  70. #editor .editor-styles-wrapper .has-primary-background-color,
  71. #editor .editor-styles-wrapper .wp-block .has-primary-background-color,
  72. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:focus,
  73. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:hover,
  74. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .has-focus.button,
  75. #editor .editor-styles-wrapper .wp-block-search .wp-block-search__button:focus,
  76. #editor .editor-styles-wrapper .wp-block-search .wp-block-search__button:hover,
  77. #editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link.has-focus,
  78. #editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus,
  79. #editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
  80. #editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'background-color' ),
  81. array( '#editor .editor-styles-wrapper .wp-block-quote', 'border-left-color' ),
  82. /**
  83. * Utility Classes
  84. */
  85. // Text-color
  86. array( '#editor .editor-styles-wrapper .has-primary-color,
  87. #editor .editor-styles-wrapper .wp-block .has-primary-color', 'color' ),
  88. // Background-color
  89. array( '#editor .editor-styles-wrapper .has-primary-background-color,
  90. #editor .editor-styles-wrapper .wp-block .has-primary-background-color', 'background-color' ),
  91. ), __( 'Link Color' ) );
  92. // Text Color (Gray)
  93. // $config-global--color-foreground-default
  94. add_editor_color_rule( 'txt', '#252E36', array(
  95. // Text-color
  96. array( '#editor .editor-styles-wrapper .editor-post-title__block .editor-post-title__input,
  97. #editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link,
  98. #editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link.has-focus,
  99. #editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:focus,
  100. #editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:hover,
  101. #editor .editor-styles-wrapper .wp-block-button__link.is-style-outline,
  102. #editor .editor-styles-wrapper .wp-block-button__link.is-style-outline.has-focus,
  103. #editor .editor-styles-wrapper .wp-block-button__link.is-style-outline:focus,
  104. #editor .editor-styles-wrapper .wp-block-button__link.is-style-outline:hover,
  105. #editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus,
  106. #editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
  107. #editor .editor-styles-wrapper .wp-block-button__link.is-style-outline.has-focus,
  108. #editor .editor-styles-wrapper .wp-block-button__link.is-style-outline:focus,
  109. #editor .editor-styles-wrapper .wp-block-button__link.is-style-outline:hover,
  110. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts .cat-links a:active,
  111. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts .cat-links a:hover,
  112. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-meta a:active,
  113. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-meta a:hover,
  114. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a:hover,
  115. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts .more-link:active,
  116. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts .more-link:hover,
  117. #editor .editor-styles-wrapper .wp-block-pullquote,
  118. #editor .editor-styles-wrapper .wp-block-table.is-style-stripes tbody tr:nth-child(odd),
  119. #editor .editor-styles-wrapper table.is-style-stripes tbody tr:nth-child(odd),
  120. #editor .editor-styles-wrapper a:hover,
  121. #editor .editor-styles-wrapper', 'color' ),
  122. // Border-top-color
  123. array( '#editor .editor-styles-wrapper .wp-block-pullquote', 'border-top-color' ),
  124. // Border-bottom-color
  125. array( '#editor .editor-styles-wrapper .comment-list,
  126. #editor .editor-styles-wrapper .wp-block-pullquote,
  127. #editor .editor-styles-wrapper hr,
  128. #editor .editor-styles-wrapper hr.wp-block-separator', 'border-bottom-color' ),
  129. // Background-color
  130. array( '#editor .editor-styles-wrapper .button,
  131. #editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button,
  132. #editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link,
  133. #editor .editor-styles-wrapper .wp-block-search .wp-block-search__button', 'background-color' ),
  134. /**
  135. * Utility Classes
  136. */
  137. // Text-color
  138. array( '#editor .editor-styles-wrapper .has-background-background-color,
  139. #editor .editor-styles-wrapper .has-background-dark-background-color,
  140. #editor .editor-styles-wrapper .has-background-light-background-color,
  141. #editor .editor-styles-wrapper .has-foreground-color,
  142. #editor .editor-styles-wrapper .wp-block .has-background-background-color,
  143. #editor .editor-styles-wrapper .wp-block .has-background-dark-background-color,
  144. #editor .editor-styles-wrapper .wp-block .has-background-light-background-color,
  145. #editor .editor-styles-wrapper .wp-block .has-foreground-color', 'color' ),
  146. // Background-color
  147. array( '#editor .editor-styles-wrapper .has-foreground-background-color,
  148. #editor .editor-styles-wrapper .wp-block .has-foreground-background-color', 'background-color' ),
  149. // Text-color darkened
  150. array( '#editor .editor-styles-wrapper .has-foreground-dark-color,
  151. #editor .editor-styles-wrapper .wp-block .has-foreground-dark-color', 'color', '-1' ),
  152. // Background-color darkened
  153. array( '#editor .editor-styles-wrapper .has-foreground-dark-background-color,
  154. #editor .editor-styles-wrapper .wp-block .has-foreground-dark-background-color', 'background-color', '-1' ),
  155. // Text-color brightened
  156. array( '#editor .editor-styles-wrapper .has-foreground-light-color,
  157. #editor .editor-styles-wrapper .wp-block .has-foreground-light-color', 'color', '+2' ),
  158. // Background-color brightened
  159. array( '#editor .editor-styles-wrapper .has-foreground-light-background-color,
  160. #editor .editor-styles-wrapper .wp-block .has-foreground-light-background-color', 'background-color', '+2' ),
  161. ), __( 'Text Color' ) );
  162. // Accent Color (Red)
  163. // $config-global--color-secondary-default
  164. add_editor_color_rule( 'fg1', '#FFFFFF', array(
  165. /**
  166. * Utility Classes
  167. */
  168. // Text-color
  169. array( '#editor .editor-styles-wrapper .has-secondary-color,
  170. #editor .editor-styles-wrapper .wp-block .has-secondary-color', 'color' ),
  171. // Background-color
  172. array( '#editor .editor-styles-wrapper .has-secondary-background-color,
  173. #editor .editor-styles-wrapper .wp-block .has-secondary-background-color', 'background-color' ),
  174. ), __( 'Secondary Color' ) );