wpcom-colors.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. <?php
  2. /* Custom Colors: TextBook */
  3. /**
  4. * TAN --------------------
  5. */
  6. add_color_rule( 'bg', '#f0eeec', array(
  7. // Background-color
  8. array( 'body,
  9. .entry-content table tbody tr:nth-child(even)', 'background-color', 12 ),
  10. // Background-color, darken to #e1dfdc
  11. array( '.testimonials,
  12. .testimonials .entry-content', 'background-color', '-0.5', '#222222' ),
  13. // Border color, contrast black
  14. array( '.comment-meta:before', 'border-color', '#222222', 12 ),
  15. // Border color, darken to #e1dfdc
  16. array( '.testimonials .hentry .entry-content:after', 'border-top-color', '-0.5', '#222222' ),
  17. array( '.testimonials .hentry .entry-content:after', 'border-left-color', '-0.5', '#222222' ),
  18. ), __( 'Background Color' ) );
  19. /**
  20. * BURGUNDY --------------------
  21. */
  22. add_color_rule( 'link', '#ce4639', array(
  23. // Border color
  24. // Border color, no contrast
  25. array( 'button,
  26. button:active,
  27. button:focus,
  28. input[type="button"],
  29. input[type="button"]:active,
  30. input[type="button"]:focus,
  31. input[type="reset"],
  32. input[type="reset"]:active,
  33. input[type="reset"]:focus,
  34. input[type="submit"],
  35. input[type="submit"]:active,
  36. input[type="submit"]:focus,
  37. .card:nth-of-type(3n+1) .entry-content,
  38. .card:nth-of-type(3n+1) .entry-header,
  39. .card:nth-of-type(3n+1) .entry-header .entry-meta:before', 'border-color' ),
  40. // Border color, contrast bg
  41. array( '.comments-title,
  42. .comment-list,
  43. .comment-respond,
  44. .comments-area ol > li:nth-of-type(3n+1) .comment-respond,
  45. .comments-area ol > li:nth-of-type(3n+1) .comment-body .avatar,
  46. .entry-content table tbody,
  47. .entry-content table td,
  48. .entry-content table th,
  49. .hentry > .sharedaddy:not(#jp-post-flair),
  50. .highlander-enabled #respond,
  51. .post-navigation,
  52. .posts-navigation,
  53. .comment-navigation,
  54. .search-box,
  55. .single .hentry,
  56. .page .page,
  57. .single .hentry:not(.post),
  58. .single .jetpack-testimonial,
  59. .single .hentry .post-thumbnail:before,
  60. .testimonials .hentry:nth-of-type(3n+1) .entry-content,
  61. .flex-direction-nav a,
  62. #jp-post-flair > *,
  63. #jp-post-flair .jp-relatedposts .jp-relatedposts-headline em:before,
  64. #jp-post-flair div.sharedaddy h3.sd-title:before,
  65. #jp-post-flair h3.sd-title:before,
  66. .card .entry-header .entry-meta:before,
  67. .hentry > .sharedaddy:not(#jp-post-flair) .sd-title:before,
  68. .menu-toggle.toggled-on,
  69. .main-navigation .dropdown-toggle.toggled-on,
  70. .main-navigation > div > ul,
  71. .main-navigation > div > ul li:before,
  72. .post-navigation .nav-next:before,
  73. .post-navigation .nav-previous:before,
  74. .post-navigation a .meta-nav:before,
  75. .posts-navigation .nav-next:before,
  76. .posts-navigation .nav-previous:before,
  77. .posts-navigation a .meta-nav:before,
  78. .comment-navigation .nav-next:before,
  79. .comment-navigation .nav-previous:before,
  80. .comment-navigation a .meta-nav:before,
  81. .main-navigation .children:before,
  82. .main-navigation .sub-menu:before', 'border-color', 'bg', 2 ),
  83. // Border side color, contrast bg
  84. array( '.testimonials .hentry:nth-of-type(3n+1) .entry-content:before', 'border-top-color', 'bg', 2 ),
  85. array( '.testimonials .hentry:nth-of-type(3n+1) .entry-content:before', 'border-left-color', 'bg', 2 ),
  86. // Border color, contrast black
  87. array( '.search-box .search-submit:focus,
  88. .single .hentry .entry-header:before,
  89. .single .hentry .entry-meta:before,
  90. .single .hentry .entry-title:before,
  91. .entry-breadcrumbs:before,
  92. .featured-content-inner .hentry:nth-of-type(3n+1):before,
  93. .featured-content-inner .hentry:nth-of-type(3n+1) .post-thumbnail,
  94. .footer-widget-area .widget:nth-of-type(3n+2):before', 'border-color', '#222222' ),
  95. // Text color
  96. // Text color, contrast bg
  97. array( '#masthead .site-branding a:hover,
  98. #masthead .site-branding a:active,
  99. #masthead .search-toggle a:hover,
  100. #masthead .search-toggle a:active,
  101. #masthead .jetpack-social-navigation a:active,
  102. #masthead .jetpack-social-navigation a:hover,
  103. .search-toggle a:active,
  104. .search-toggle a:hover,
  105. .site-content #secondary .widget:nth-of-type(3n+1) a,
  106. .testimonials .hentry:nth-of-type(3n+1) a', 'color', 'bg', 3 ),
  107. // Text color, contrast white
  108. array( '.main-navigation a,
  109. button,
  110. input[type="button"],
  111. input[type="reset"],
  112. input[type="submit"],
  113. .entry-content a,
  114. .entry-content a:visited,
  115. .edit-link a,
  116. #jp-post-flair .jp-relatedposts .jp-relatedposts-headline em,
  117. #jp-post-flair div.sharedaddy h3.sd-title,
  118. #jp-post-flair h3.sd-title,
  119. #jp-post-flair div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post .jp-relatedposts-post-a,
  120. .card:nth-of-type(3n+1) .entry-header a,
  121. .card:nth-of-type(3n+1) .star,
  122. .hentry > .sharedaddy:not(#jp-post-flair) .sd-title,
  123. .flex-direction-nav a,
  124. .flex-direction-nav a:before,
  125. .comment-navigation a,
  126. .comments-area ol > li:nth-of-type(3n+1) a,
  127. .highlander-enabled #main #respond .comment-form-service a,
  128. .posts-navigation .nav-links a,
  129. .post-navigation .nav-links a,
  130. .comments-navigation .nav-links a', 'color', '#ffffff', 2 ),
  131. // Text color, contrast black
  132. array( '.entry-breadcrumbs a,
  133. .single .hentry .entry-meta > *,
  134. .featured-content-inner .hentry:nth-of-type(3n+1) .entry-meta a,
  135. .comments-area > ol > li:nth-of-type(3n+1) h3 small a,
  136. .comment-reply-title a', 'color', '#222222' ),
  137. array( 'button:active,
  138. button:focus,
  139. input[type="button"]:active,
  140. input[type="button"]:focus,
  141. input[type="reset"]:active,
  142. input[type="reset"]:focus,
  143. input[type="submit"]:active,
  144. input[type="submit"]:focus,
  145. .card .entry-content,
  146. .card:nth-of-type(3n+1) .entry-content,
  147. .comment-navigation a:active,
  148. .comment-navigation a:focus,
  149. .main-navigation .dropdown-toggle.toggled-on,
  150. .menu-toggle.toggled-on,
  151. .single .hentry .cat-links li:nth-of-type(3n+3) a,
  152. .site-content #secondary .widget_categories li:nth-of-type(3n+3) a,
  153. .site-content #secondary .widget_tag_cloud div a:nth-of-type(3n+3),
  154. .site-content #secondary .wp_widget_tag_cloud div a:nth-of-type(3n+3)', 'background-color' ),
  155. // Background color
  156. // Background color, contrast black
  157. array( '.search-box .search-submit:focus', 'background-color' ),
  158. array( '.single .hentry .meta-sep,
  159. .featured-content-inner .hentry:nth-of-type(3n+1) .post-thumbnail', 'background-color', '#222222' ),
  160. ), __( 'Category Color 1', 'textbook' ) );
  161. /**
  162. * GREEN --------------------
  163. */
  164. add_color_rule( 'fg1', '#26866d', array(
  165. // Border color
  166. array( '.main-navigation .dropdown-toggle:focus,
  167. #infinite-handle > span button,
  168. #infinite-handle > span button:active,
  169. #infinite-handle > span button:focus,
  170. .card:nth-of-type(3n+2) .entry-content,
  171. .card:nth-of-type(3n+2) .entry-header,
  172. .card:nth-of-type(3n+2) .entry-header .entry-meta:before', 'border-color' ),
  173. // Fill color
  174. array( '.main-navigation .dropdown-toggle:focus svg', 'fill' ),
  175. // Border color, contrast bg
  176. array( '.testimonials .hentry:nth-of-type(3n+2) .entry-content,
  177. .comments-area ol > li:nth-of-type(3n+2) .comment-respond,
  178. .comments-area ol > li:nth-of-type(3n+2) .comment-body .avatar', 'border-color', 'bg', 2 ),
  179. array( '.testimonials .hentry:nth-of-type(3n+2) .entry-content:before', 'border-top-color', 'bg', 2 ),
  180. array( '.testimonials .hentry:nth-of-type(3n+2) .entry-content:before', 'border-left-color', 'bg', 2 ),
  181. // Border color, contrast black
  182. array( '.featured-page-highlight .hentry,
  183. .featured-content-inner .hentry:nth-of-type(3n+2):before,
  184. .featured-content-inner .hentry:nth-of-type(3n+2) .post-thumbnail,
  185. .footer-widget-area .widget:nth-of-type(3n+3):before', 'border-color', '#222222' ),
  186. // Background color
  187. // Background color, no contrast
  188. array( '#infinite-handle > span button:active,
  189. #infinite-handle > span button:focus,
  190. .card:nth-of-type(3n+2) .entry-content,
  191. .single .hentry .cat-links li:nth-of-type(3n+1) a,
  192. .site-content #secondary .widget_categories li:nth-of-type(3n+1) a,
  193. .site-content #secondary .widget_tag_cloud div a:nth-of-type(3n+1),
  194. .site-content #secondary .wp_widget_tag_cloud div a:nth-of-type(3n+1)', 'background-color' ),
  195. // Background color, contrast black
  196. array( '.featured-content-inner .hentry:nth-of-type(3n+2) .post-thumbnail', 'background-color', '#222222' ),
  197. // Text color
  198. // Text color, contrast bg
  199. array( '.site-content #secondary .widget:nth-of-type(3n+2) a,
  200. .testimonials .hentry:nth-of-type(3n+2) a', 'color', 'bg', 3 ),
  201. // Text color, contrast white
  202. array( '#infinite-handle > span button,
  203. .entry-content a:active,
  204. .entry-content a:focus,
  205. .entry-content a:hover,
  206. .card:nth-of-type(3n+2) .entry-header a,
  207. .card:nth-of-type(3n+2) .star,
  208. .comments-area ol > li:nth-of-type(3n+2) a', 'color', '#ffffff', 2 ),
  209. // Text color, contrast black
  210. array( '.featured-content-inner .hentry:nth-of-type(3n+2) .entry-meta a,
  211. .featured-page-highlight .hentry a,
  212. .comments-area > ol > li:nth-of-type(3n+2) h3 small a', 'color', '#222222' ),
  213. ), __( 'Category Color 2', 'textbook' ) );
  214. /**
  215. * PURPLE --------------------
  216. */
  217. add_color_rule( 'fg2', '#604d88', array(
  218. // Background-color
  219. array( '.card:nth-of-type(3n+3) .entry-content,
  220. .single .hentry .cat-links li:nth-of-type(3n+2) a,
  221. .site-content #secondary .widget_categories li:nth-of-type(3n+2) a,
  222. .site-content #secondary .widget_tag_cloud div a:nth-of-type(3n+2),
  223. .site-content #secondary .wp_widget_tag_cloud div a:nth-of-type(3n+2)', 'background-color' ),
  224. // Background color, contrast black
  225. array( '.featured-content-inner .hentry:nth-of-type(3n+3) .post-thumbnail', 'background-color', '#222222' ),
  226. // Border color
  227. array( '.card:nth-of-type(3n+3) .entry-content,
  228. .card:nth-of-type(3n+3) .entry-header,
  229. .card:nth-of-type(3n+3) .entry-header .entry-meta:before', 'border-color' ),
  230. // Border color, contrast bg
  231. array( '.testimonials .hentry:nth-of-type(3n+3) .entry-content,
  232. .comments-area ol > li:nth-of-type(3n+3) .comment-respond,
  233. .comments-area ol > li:nth-of-type(3n+3) .comment-body .avatar', 'border-color', 'bg', 2 ),
  234. array( '.testimonials .hentry:nth-of-type(3n+3) .entry-content:before', 'border-top-color', 'bg', 2 ),
  235. array( '.testimonials .hentry:nth-of-type(3n+3) .entry-content:before', 'border-left-color', 'bg', 2 ),
  236. // Border color, contrast black
  237. array( '.featured-content-inner .hentry:nth-of-type(3n+3):before,
  238. .featured-content-inner .hentry:nth-of-type(3n+3) .post-thumbnail,
  239. .footer-widget-area .widget:nth-of-type(3n+4):before', 'border-color', '#222222' ),
  240. // Text color, contrast bg
  241. array( '.site-content #secondary .widget:nth-of-type(3n+3) a,
  242. .testimonials .hentry:nth-of-type(3n+3) a', 'color', 'bg', 3 ),
  243. // Text color, contrast white
  244. array( '.card:nth-of-type(3n+3) .entry-header a,
  245. .card:nth-of-type(3n+3) .star,
  246. .comments-area > ol > li:nth-of-type(3n+3) a', 'color', '#ffffff', 2 ),
  247. // Text color, contrast black
  248. array( '.featured-content-inner .hentry:nth-of-type(3n+3) .entry-meta a,
  249. .comments-area > ol > li:nth-of-type(3n+3) h3 small a', 'color', '#222222' ),
  250. ), __( 'Category Color 3', 'textbook' ) );
  251. /**
  252. * BLACK --------------------
  253. */
  254. add_color_rule( 'txt', '#222222', array(
  255. // Leave Empty
  256. ), __( 'Dark Color', 'textbook' ) );
  257. /**
  258. * BLACK --------------------
  259. */
  260. add_color_rule( 'extra', '#222222', array(
  261. // Text color, contrast bg
  262. array( '#masthead .site-branding a,
  263. #masthead .site-description,
  264. #masthead .search-toggle a,
  265. #masthead .jetpack-social-navigation a,
  266. .testimonials .entry-content p,
  267. .testimonials-header,
  268. .testimonials .entry-header', 'color', 'bg', 5 ),
  269. // Background color
  270. array( '.search-box .search-submit,
  271. .posts-navigation a:hover,
  272. .posts-navigation a:focus,
  273. .post-navigation a:hover,
  274. .post-navigation a:focus,
  275. .comment-navigation a:hover,
  276. .comment-navigation a:focus', 'background' ),
  277. // Background color
  278. array( '.search-box .search-submit', 'border-color' ),
  279. ), __( 'Text Color', 'textbook' ) );
  280. /**
  281. * BLACK --------------------
  282. */
  283. add_color_rule( 'extra', '#434343', array(
  284. // Text color, contrast bg
  285. array( 'body', 'color', 'bg', 5 ),
  286. ) );
  287. /**
  288. * WHITE --------------------
  289. */
  290. add_color_rule( 'extra', '#ffffff', array(
  291. // 1st Card color offset
  292. array( 'button:hover,
  293. input[type="button"]:hover,
  294. input[type="reset"]:hover,
  295. input[type="submit"]:hover,
  296. button:focus,
  297. input[type="button"]:focus,
  298. input[type="reset"]:focus,
  299. input[type="submit"]:focus,
  300. .search-box .search-submit,
  301. .menu-toggle.toggled-on,
  302. .card:nth-of-type(3n+1):hover .star,
  303. .card:nth-of-type(3n+1) .entry-content a,
  304. .card:nth-of-type(3n+1) .entry-content,
  305. .single .hentry .cat-links li:nth-of-type(3n+3) a,
  306. .site-content #secondary .widget_categories li:nth-of-type(3n+3) a,
  307. .site-content #secondary .widget_tag_cloud div a:nth-of-type(3n+3),
  308. .site-content #secondary .wp_widget_tag_cloud div a:nth-of-type(3n+3)', 'color', 'link' ),
  309. array( '.card:nth-of-type(3n+1) .entry-content .entry-meta:before,
  310. .posts-navigation .nav-next:focus .meta-nav,
  311. .posts-navigation .nav-previous:focus .meta-nav,
  312. .posts-navigation a:focus .meta-nav:before,
  313. .post-navigation .nav-next:focus .meta-nav,
  314. .post-navigation .nav-previous:focus .meta-nav,
  315. .post-navigation a:focus .meta-nav:before,
  316. .comment-navigation .nav-next:hover .meta-nav,
  317. .comment-navigation .nav-next:focus .meta-nav,
  318. .comment-navigation .nav-previous:hover .meta-nav,
  319. .comment-navigation .nav-previous:focus .meta-nav,
  320. .comment-navigation a:hover .meta-nav:before,
  321. .comment-navigation a:focus .meta-nav:before', 'border-color', 'link' ),
  322. // 2nd Card color offset
  323. array( '.card:nth-of-type(3n+2):hover .star,
  324. .card:nth-of-type(3n+2) .entry-content a,
  325. .card:nth-of-type(3n+2) .entry-content,
  326. .single .hentry .cat-links li:nth-of-type(3n+1) a,
  327. .site-content #secondary .widget_categories li:nth-of-type(3n+1) a,
  328. .site-content #secondary .widget_tag_cloud div a:nth-of-type(3n+1),
  329. .site-content #secondary .wp_widget_tag_cloud div a:nth-of-type(3n+1)', 'color', 'fg1' ),
  330. array( '.card:nth-of-type(3n+2) .entry-content .entry-meta:before', 'border-color', 'fg1' ),
  331. // 3rd Card color offset
  332. array( '.card:nth-of-type(3n+3):hover .star,
  333. .card:nth-of-type(3n+3) .entry-content a,
  334. .card:nth-of-type(3n+3) .entry-content,
  335. .single .hentry .cat-links li:nth-of-type(3n+2) a,
  336. .site-content #secondary .widget_categories li:nth-of-type(3n+2) a,
  337. .site-content #secondary .widget_tag_cloud div a:nth-of-type(3n+2),
  338. .site-content #secondary .wp_widget_tag_cloud div a:nth-of-type(3n+2)', 'color', 'fg2' ),
  339. array( '.card:nth-of-type(3n+3) .entry-content .entry-meta:before', 'border-color', 'fg2' ),
  340. // White on Black
  341. array( '.single .hentry .cat-links li:nth-of-type(3n+1):hover a,
  342. .single .hentry .cat-links li:nth-of-type(3n+2):hover a,
  343. .single .hentry .cat-links li:nth-of-type(3n+3):hover a,
  344. .single .hentry .entry-meta > *:hover,
  345. .featured-content-inner .hentry .entry-meta a:hover,
  346. .featured-content-inner .hentry .entry-meta a:active,
  347. .posts-navigation .nav-links a:hover,
  348. .post-navigation .nav-links a:hover,
  349. .comment-navigation .nav-links a:hover,
  350. .posts-navigation a:focus,
  351. .post-navigation a:focus,
  352. .comment-navigation a:focus', 'color', '#222222' ),
  353. // White on Black
  354. array( 'button,
  355. #infinite-handle > span button', 'background-color', 'bg', 1 ),
  356. ) );
  357. // Extra CSS
  358. function textbook_extra_css() {
  359. $color_array = get_theme_mod( 'colors_manager' );
  360. $bg = $color_array['colors']['bg']; // Tan
  361. $link = $color_array['colors']['link']; // Burgundy
  362. $fg1 = $color_array['colors']['fg1']; // Green
  363. $fg2 = $color_array['colors']['fg2']; // Purple
  364. $text = '#222222'; // $color_array['colors']['txt']; // Black
  365. $extra2 = '#ffffff'; // $color_array['colors']['extra']; // White
  366. ?>
  367. <?php
  368. /**
  369. * TAN --------------------
  370. */
  371. ?>
  372. @media screen and (min-width: 50em) {
  373. /* filter */
  374. .archive.header-image .site-header:before,
  375. .header-image .site-header:before,
  376. .page.header-image .site-header:before,
  377. .search.header-image .site-header:before,
  378. .single.header-image .site-header:before {
  379. filter: <?php echo $bg; ?>;
  380. }
  381. }
  382. <?php
  383. /**
  384. * BURGUNDY --------------------
  385. */
  386. ?>
  387. @media screen and (min-width: 50em) {
  388. /* border-color */
  389. #masthead .main-navigation .children:before,
  390. #masthead .main-navigation .sub-menu:before,
  391. #masthead .main-navigation .children li:before,
  392. #masthead .main-navigation .children ul:before,
  393. #masthead .main-navigation .sub-menu li:before,
  394. #masthead .main-navigation .sub-menu ul:before,
  395. .main-navigation.toggled-on > div > ul {
  396. border-color: <?php echo $link; ?>;
  397. }
  398. /* border-bottom-color */
  399. .main-navigation.add-seperators > div > ul > li:before {
  400. border-bottom-color: <?php echo $link; ?>;
  401. }
  402. /* color */
  403. .search-toggle a:active,
  404. .search-toggle a:hover {
  405. color: <?php echo $link; ?>;
  406. }
  407. }
  408. @media screen and (min-width: 37.5em) {
  409. /* border-right-color */
  410. .post-navigation .nav-previous:before,
  411. .posts-navigation .nav-previous:before,
  412. .comments-navigation .nav-previous:before,
  413. .single .hentry .entry-meta:before {
  414. border-right-color: <?php echo $link; ?>;
  415. }
  416. /* border-left-color */
  417. .post-navigation .nav-next:before,
  418. .posts-navigation .nav-next:before,
  419. .comments-navigation .nav-next:before {
  420. border-left-color: <?php echo $link; ?>;
  421. }
  422. /* border-top-color */
  423. .single .hentry .comments-link:before {
  424. border-top-color: <?php echo $link; ?>;
  425. }
  426. }
  427. <?php
  428. /**
  429. * GREEN --------------------
  430. */
  431. ?>
  432. <?php
  433. /**
  434. * PURPLE --------------------
  435. */
  436. ?>
  437. <?php
  438. /**
  439. * WHITE --------------------
  440. */
  441. ?>
  442. @media screen and (min-width: 50em) {
  443. /* color */
  444. .main-navigation a:hover,
  445. .main-navigation > div > ul > li:hover a:hover,
  446. .main-navigation > div > ul > li.focus a:hover,
  447. .main-navigation > div > ul > li.focus a:focus,
  448. .main-navigation.toggled-on > div > ul > li:hover a:hover,
  449. .main-navigation.toggled-on > div > ul > li.focus a:hover,
  450. .main-navigation.toggled-on > div > ul > li.focus a:focus
  451. .main-navigation .children li a,
  452. .main-navigation .sub-menu li a {
  453. color: <?php echo $extra2; ?>;
  454. }
  455. #masthead .main-navigation > div ul li:hover > button,
  456. #masthead .main-navigation > div ul li.focus > button,
  457. #masthead .main-navigation > div ul li:hover > button.toggled-on,
  458. #masthead .main-navigation > div ul li.focus > button.toggled-on {
  459. border-color: <?php echo $extra2; ?>;
  460. }
  461. .main-navigation > div ul li:hover > button svg,
  462. .main-navigation > div ul li.focus > button svg,
  463. .main-navigation > div ul li:hover > button svg,
  464. .main-navigation > div ul li.focus > button svg {
  465. fill: <?php echo $extra2; ?>;
  466. }
  467. .archive.header-image .site-header:before,
  468. .header-image .site-header:before,
  469. .page.header-image .site-header:before,
  470. .search.header-image .site-header:before,
  471. .single.header-image .site-header:before {
  472. filter: <?php echo $extra2; ?>;
  473. }
  474. }
  475. @media screen and (min-width: 37.5em) {
  476. /* color */
  477. .single .hentry .cat-links a {
  478. color: <?php echo $extra2; ?>;
  479. }
  480. }
  481. <?php
  482. /**
  483. * BLACK --------------------
  484. */
  485. ?>
  486. @media screen and (min-width: 50em) {
  487. /* background-color */
  488. .main-navigation .children,
  489. .main-navigation .sub-menu,
  490. .main-navigation > div > ul > li:hover,
  491. .main-navigation > div > ul > li.focus,
  492. .main-navigation.toggled-on > div > ul > li:hover,
  493. .main-navigation.toggled-on > div > ul > li.focus,
  494. .main-navigation .sub-menu li.menu-item-has-children:hover ul li,
  495. .main-navigation .sub-menu li.page_item_has_children:hover ul li,
  496. .main-navigation .children li.menu-item-has-children:hover ul li,
  497. .main-navigation .children li.page_item_has_children:hover ul li {
  498. background-color: <?php echo $text; ?>;
  499. }
  500. /* border-color */
  501. .main-navigation .dropdown-toggle.toggled-on,
  502. .main-navigation.add-seperators > div > ul > li:last-child:nth-child(-n+4):hover:before,
  503. .main-navigation.add-seperators > div > ul > li:nth-child(5n):nth-last-child(-n+6) ~ li:hover:before {
  504. border-color: <?php echo $text; ?>;
  505. }
  506. /* color */
  507. .main-navigation a:hover span,
  508. .main-navigation li.focus a span,
  509. .main-navigation .dropdown-toggle.toggled-on, {
  510. color: #CCCCCC;
  511. }
  512. /* dropdown indicator override */
  513. #masthead .menu-toggle.toggled-on,
  514. #masthead .main-navigation .dropdown-toggle.toggled-on {
  515. background: transparent;
  516. border-color: #CCCCCC;
  517. }
  518. }
  519. @media screen and (min-width: 37.5em) {
  520. /* background-color */
  521. .single .hentry .entry-header,
  522. .single .hentry .post-thumbnail {
  523. background-color: <?php echo $text; ?>;
  524. }
  525. }
  526. <?php }
  527. add_theme_support( 'custom_colors_extra_css', 'textbook_extra_css' );
  528. /**
  529. * Additional color palettes
  530. */
  531. add_color_palette( array(
  532. '#f0eeec',
  533. '',
  534. '#325cb8',
  535. '#cf0202',
  536. '#facc14'
  537. ), __( 'Blue, Red & Yellow', 'textbook' ) );
  538. add_color_palette( array(
  539. '#e0e2e5',
  540. '',
  541. '#235380',
  542. '#21303e',
  543. '#235380'
  544. ), __( 'Navy Blue on Grey', 'textbook' ) );
  545. add_color_palette( array(
  546. '#dddddd',
  547. '',
  548. '#0c758c',
  549. '#f2b05e',
  550. '#bf0a2b'
  551. ), __( 'Blue, Yellow & Red', 'textbook' ) );
  552. add_color_palette( array(
  553. '#ffffff',
  554. '',
  555. '#000000',
  556. '#000000',
  557. '#000000'
  558. ), __( 'Black on White', 'textbook' ) );
  559. add_color_palette( array(
  560. '#000000',
  561. '',
  562. '#c44d58',
  563. '#fb974b',
  564. '#9ec746'
  565. ), __( 'Red, Orange & Green', 'textbook' ) );
  566. add_color_palette( array(
  567. '#f0eeec',
  568. '',
  569. '#85798b',
  570. '#c69b80',
  571. '#c9b868'
  572. ), __( 'Pastel Purple, Cream, & Yellow', 'textbook' ) );