wpcom-colors.php 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. <?php
  2. /* Custom Colors: Dyad */
  3. //Background
  4. add_color_rule( 'bg', '#292c2f', array(
  5. array( '.site-header:before,
  6. .is-singular .entry-media-thumb,
  7. #commentform input[type="submit"],
  8. #infinite-handle,
  9. .posts-navigation,
  10. .site-footer,
  11. .site-header-cart .widget_shopping_cart_content,
  12. .widget_shopping_cart .mini_cart_item .remove:hover', 'background-color' ),
  13. array( '.site-header-cart .widget_shopping_cart:before', 'border-bottom-color' ),
  14. array( '.bypostauthor .comment-author:before', 'color' ),
  15. // contrast against white
  16. array( '#site-navigation ul ul li', 'background-color', '#ffffff', 3 ),
  17. array( '#site-navigation ul ul:before', 'border-bottom-color', '#ffffff', 3 ),
  18. array( '#site-navigation ul ul ul:before', 'border-right-color', '#ffffff', 3 ),
  19. array( '.posts .entry-inner:before', 'color', '#ffffff' ),
  20. // slightly darker version of this colour
  21. array( '.posts,
  22. .posts .entry-media,
  23. .comments-area-wrapper,
  24. .milestone-widget .milestone-header,
  25. .footer-bottom-info', 'background-color', '-0.5' ),
  26. array( '.milestone-widget .milestone-countdown', 'border-color', '-0.5' ),
  27. array( '.milestone-widget .milestone-countdown,
  28. .milestone-widget .milestone-message', 'color', '#ffffff', 2 ),
  29. // slightly darker version of this colour
  30. array( '.site-header #site-navigation ul li', 'border-color', '-1.0' ),
  31. // contrast against this colour
  32. array( '.comment-author.vcard cite', 'color', 'bg', 6 ),
  33. array( '.bypostauthor .comment-author:before', 'background-color', 'bg', 6 ),
  34. array( '.comment-meta,
  35. .comment .reply:before,
  36. .comment .reply a', 'color', 'bg', 4 ),
  37. array( '.comment-meta', 'border-bottom-color', 'bg', 2 ),
  38. ) );
  39. // Text
  40. add_color_rule( 'txt', '#616a74', array(
  41. // Contrast against bg
  42. array('#infinite-handle span button,
  43. #infinite-handle span button:hover,
  44. #infinite-handle span button:focus,
  45. .posts-navigation a,
  46. .widget,
  47. .site-footer', 'color', 'bg', 5),
  48. array( '.comments-area-wrapper', 'color', 'bg' ),
  49. array( '.widget_search ::-webkit-input-placeholder', 'color', 'bg', 3),
  50. array( '.widget_search :-moz-placeholder', 'color', 'bg', 3),
  51. array( '.widget_search ::-moz-placeholder', 'color', 'bg', 3),
  52. array( '.widget_search :-ms-input-placeholder', 'color', 'bg', 3),
  53. array('.site-header,
  54. #site-navigation a,
  55. .menu-toggle,
  56. .comments-title .add-comment-link,
  57. .comments-title,
  58. .comments-title a,
  59. .comments-area-wrapper,
  60. .comments-area-wrapper h1,
  61. .comments-area-wrapper h2,
  62. .comments-area-wrapper h3,
  63. .comments-area-wrapper h4,
  64. .comments-area-wrapper h5,
  65. .comments-area-wrapper h6,
  66. .comment-body pre,
  67. .comment-footer .author.vcard,
  68. .comment-footer,
  69. #commentform input[type="submit"],
  70. .widget h1,
  71. .widget h2,
  72. .widget h3,
  73. .widget h4,
  74. .widget h5,
  75. .widget h6,
  76. .widget a,
  77. .widget button,
  78. .widget_search input,
  79. .widget input[type="submit"],
  80. .widget-area select,
  81. .widget_flickr #flickr_badge_uber_wrapper a:hover,
  82. .widget_flickr #flickr_badge_uber_wrapper a:link,
  83. .widget_flickr #flickr_badge_uber_wrapper a:active,
  84. .widget_flickr #flickr_badge_uber_wrapper a:visited,
  85. .widget_goodreads div[class^="gr_custom_each_container"],
  86. .milestone-header', 'color', 'bg', 12),
  87. array( '.widget ul li,
  88. .widget_jp_blogs_i_follow ol li', 'border-top-color', 'bg', 0.2 ),
  89. array( '.comment-footer,
  90. .widget ul li,
  91. .widget_jp_blogs_i_follow ol li', 'border-bottom-color', 'bg', 0.2 ),
  92. array( '.comments-title,
  93. .comments-area-wrapper blockquote,
  94. #commentform input[type="text"],
  95. #commentform input[type="email"],
  96. #commentform input[type="url"],
  97. #commentform textarea,
  98. .widget .tagcloud a,
  99. .widget.widget_tag_cloud a,
  100. .wp_widget_tag_cloud a,
  101. .widget button,
  102. .widget input[type="submit"],
  103. .widget table,
  104. .widget th,
  105. .widget td,
  106. .widget input,
  107. .widget select,
  108. .widget textarea', 'border-color', 'bg', 0.2 ),
  109. // Contrast against link
  110. array( '.site-banner-header .banner-featured', 'color', 'link' ),
  111. // Contrast against white
  112. array( '.error404-widgets .widget a', 'color', '#ffffff' ),
  113. array( '.error404 .entry-content .widget ul li', 'color', '#ffffff', 3 ),
  114. ) );
  115. // bright blue
  116. add_color_rule( 'link', '#678db8', array(
  117. array( '.site-banner-header .banner-featured,
  118. .banner-custom-header .site-banner-header h1:before,
  119. .has-post-thumbnail .entry-meta .cat-links,
  120. .widget_shopping_cart .mini_cart_item .remove,
  121. .woocommerce-tabs ul.tabs li.active a,
  122. .widget_price_filter .ui-slider .ui-slider-handle,
  123. .widget_price_filter .ui-slider .ui-slider-range,
  124. .single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger', 'background-color' ),
  125. array( '.button,
  126. button,
  127. input[type="submit"],
  128. .onsale', 'background-color', '#ffffff', 2 ),
  129. array( '.button,
  130. button,
  131. input[type="submit"],
  132. table.shop_table td.actions .coupon .button', 'border-color' ),
  133. // text
  134. array( '.single-product div.product .price .amount,
  135. .star-rating span:before,
  136. p.stars:hover a:before,
  137. p.stars.selected a.active:before,
  138. p.stars.selected a:not(.active):before', 'color' ),
  139. // Contrast against white
  140. array( '.error404 .entry-content .widget ul li', 'border-color', '#ffffff', 2 ),
  141. ) );
  142. // yellow
  143. add_color_rule( 'fg1', '#e7ae01', array(
  144. // contrast against white
  145. array( 'pre:before,
  146. .link-more a,
  147. .posts .hentry:hover .link-more a,
  148. .is-singular .entry-inner:after,
  149. .error404 .entry-inner:after,
  150. .page-template-eventbrite-index .page-header:after,
  151. .single-event .entry-header:after,
  152. .is-singular .post-navigation .nav-links:after,
  153. .single-product div.product:after,
  154. .single-product .product section:first-of-type::after,
  155. .product .button,
  156. ul.products li.product .button', 'background-color', '#ffffff', 1 ),
  157. // contrast against link
  158. array( '.has-post-thumbnail.is-singular:not(.home) .entry-header .cat-links a', 'color', 'link', 3 ),
  159. ) );
  160. add_color_rule( 'extra', '#ffffff', array(
  161. // contrast against Accent #1
  162. array( '.link-more a', 'color', 'fg1', 2 ),
  163. ) );
  164. //Extra CSS
  165. function dyad_extra_css() { ?>
  166. blockquote,
  167. blockquote cite,
  168. .comments-area-wrapper blockquote,
  169. .comments-area-wrapper blockquote cite {
  170. color: inherit;
  171. }
  172. .site-header,
  173. .is-scrolled .site-header,
  174. .home .site-header,
  175. .blog .site-header {
  176. background: transparent;
  177. text-shadow: none;
  178. }
  179. #page .site-header:before {
  180. bottom: 0;
  181. content: "";
  182. display: block;
  183. left: 0;
  184. opacity: 0.8;
  185. position: absolute;
  186. right: 0;
  187. top: 0;
  188. z-index: 0;
  189. }
  190. #site-navigation ul ul a {
  191. color: #fff;
  192. }
  193. .banner-featured {
  194. text-shadow: none;
  195. }
  196. .posts .entry-inner:before {
  197. opacity: 0.3;
  198. }
  199. .posts .hentry:not(.has-post-thumbnail) .entry-inner:after {
  200. border-color: #ddd;
  201. }
  202. .posts .hentry:not(.has-post-thumbnail):before {
  203. border-color: #e1e1e1;
  204. }
  205. .posts .hentry .link-more a {
  206. opacity: 1.0;
  207. -webkit-transition: opacity 0.3s;
  208. transition: opacity 0.3s;
  209. }
  210. .posts .hentry:hover .link-more a {
  211. opacity: 0.75;
  212. }
  213. .posts .edit-link a {
  214. color: #ccc;
  215. }
  216. .posts .edit-link a:hover {
  217. color: #aaa;
  218. }
  219. .widget thead tr,
  220. .widget tr:hover {
  221. background-color: rgba(0,0,0,0.1);
  222. }
  223. @media only screen and (max-width: 1200px) {
  224. .site-header:before,
  225. .is-scrolled .site-header:before {
  226. opacity: 1.0;
  227. }
  228. .has-post-thumbnail .entry-header .entry-meta .cat-links {
  229. background-color: transparent;
  230. }
  231. .has-post-thumbnail.is-singular:not(.home) .entry-header .cat-links a,
  232. .has-post-thumbnail.is-singular:not(.home) .entry-header .cat-links {
  233. color: #6a6c6e !important;
  234. }
  235. }
  236. @media only screen and (max-width: 960px) {
  237. #site-navigation ul a,
  238. #site-navigation ul ul a {
  239. color: inherit;
  240. }
  241. .site-header #site-navigation ul ul li {
  242. background-color: transparent;
  243. }
  244. }
  245. <?php }
  246. add_theme_support( 'custom_colors_extra_css', 'dyad_extra_css' );
  247. //Additional palettes
  248. add_color_palette( array(
  249. '#42282f',
  250. '#653f49',
  251. '#d6655a',
  252. '#74a588',
  253. ) );
  254. add_color_palette( array(
  255. '#1e1e20',
  256. '#2a2c2b',
  257. '#dc3522',
  258. '#d9cb9e',
  259. ) );
  260. add_color_palette( array(
  261. '#193441',
  262. '#3e606f',
  263. '#91aa9d',
  264. '#d1dbbd',
  265. ) );
  266. add_color_palette( array(
  267. '#ffffff',
  268. '#dddddd',
  269. '#01a2a6',
  270. '#1ed3d7',
  271. ) );
  272. add_color_palette( array(
  273. '#26231c',
  274. '#787166',
  275. '#accfcc',
  276. '#baaf9e'
  277. ) );
  278. add_color_palette( array(
  279. '#111625',
  280. '#baaf9e',
  281. '#571b3c',
  282. '#accfcc'
  283. ) );