浏览代码

Merge branch 'master' into seedlet-blocks/add/site-logo-block

Kjell Reigstad 5 年之前
父节点
当前提交
7a34f1f23b
共有 94 个文件被更改,包括 3537 次插入374 次删除
  1. 1 0
      .gitignore
  2. 36 23
      balasana/functions.php
  3. 453 0
      balasana/inc/wpcom-colors.php
  4. 186 0
      balasana/inc/wpcom-editor-colors.php
  5. 21 0
      balasana/inc/wpcom.php
  6. 1 1
      balasana/sass/_config-child-theme-deep.scss
  7. 1 0
      balasana/sass/_extra-child-theme.scss
  8. 15 15
      balasana/style-editor.css
  9. 31 28
      balasana/style-rtl.css
  10. 13 13
      balasana/style-woocommerce-rtl.css
  11. 13 13
      balasana/style-woocommerce.css
  12. 31 28
      balasana/style.css
  13. 37 23
      barnsbury/functions.php
  14. 353 0
      barnsbury/inc/wpcom-colors.php
  15. 186 0
      barnsbury/inc/wpcom-editor-colors.php
  16. 21 0
      barnsbury/inc/wpcom.php
  17. 36 23
      brompton/functions.php
  18. 502 0
      brompton/inc/wpcom-colors.php
  19. 224 0
      brompton/inc/wpcom-editor-colors.php
  20. 21 0
      brompton/inc/wpcom.php
  21. 5 5
      brompton/package-lock.json
  22. 9 0
      brompton/sass/_extra-child-theme.scss
  23. 22 0
      brompton/style-rtl.css
  24. 22 0
      brompton/style.css
  25. 54 24
      dalston/functions.php
  26. 452 0
      dalston/inc/wpcom-colors.php
  27. 182 0
      dalston/inc/wpcom-editor-colors.php
  28. 21 0
      dalston/inc/wpcom.php
  29. 1 1
      dalston/sass/_extra-child-theme.scss
  30. 2 2
      dalston/style-rtl.css
  31. 2 2
      dalston/style.css
  32. 1 0
      hever/functions.php
  33. 1 1
      hever/sass/style-child-theme.scss
  34. 1 1
      hever/style-rtl.css
  35. 1 1
      hever/style.css
  36. 二进制
      ibis/Screenshot.png
  37. 11 0
      ibis/block-template-parts/footer.html
  38. 17 0
      ibis/block-template-parts/header.html
  39. 15 0
      ibis/block-templates/index.html
  40. 13 0
      ibis/block-templates/singular.html
  41. 58 0
      ibis/experimental-theme.json
  42. 71 0
      ibis/functions.php
  43. 33 0
      ibis/readme.txt
  44. 48 0
      ibis/style-editor.css
  45. 116 0
      ibis/style.css
  46. 15 0
      illustratr/blocks.css
  47. 6 0
      illustratr/editor-blocks.css
  48. 3 5
      seedlet-blocks/block-template-parts/header.html
  49. 2 2
      seedlet-blocks/functions.php
  50. 1 2
      seedlet/404.php
  51. 1 2
      seedlet/archive.php
  52. 37 9
      seedlet/assets/css/ie.css
  53. 19 15
      seedlet/assets/css/style-editor.css
  54. 4 4
      seedlet/assets/js/customizer-validate-wcag-color-contrast.js
  55. 10 7
      seedlet/assets/sass/base/_editor.scss
  56. 9 6
      seedlet/assets/sass/base/_reset.scss
  57. 3 0
      seedlet/assets/sass/blocks/cover/_editor.scss
  58. 3 0
      seedlet/assets/sass/blocks/cover/_style.scss
  59. 0 6
      seedlet/assets/sass/blocks/media-text/_editor.scss
  60. 0 9
      seedlet/assets/sass/blocks/media-text/_style.scss
  61. 0 4
      seedlet/assets/sass/blocks/paragraph/_editor.scss
  62. 5 0
      seedlet/assets/sass/blocks/paragraph/_style.scss
  63. 1 1
      seedlet/assets/sass/style.scss
  64. 4 5
      seedlet/classes/class-seedlet-custom-colors.php
  65. 1 2
      seedlet/classes/class-seedlet-svg-icons.php
  66. 1 2
      seedlet/footer.php
  67. 4 2
      seedlet/functions.php
  68. 3 4
      seedlet/header.php
  69. 1 2
      seedlet/image.php
  70. 1 2
      seedlet/inc/back-compat.php
  71. 1 2
      seedlet/inc/block-patterns.php
  72. 1 2
      seedlet/inc/customizer.php
  73. 1 2
      seedlet/inc/icon-functions.php
  74. 1 2
      seedlet/inc/template-functions.php
  75. 1 2
      seedlet/inc/template-tags.php
  76. 1 1
      seedlet/inc/woocommerce.php
  77. 1 2
      seedlet/index.php
  78. 1 2
      seedlet/page.php
  79. 二进制
      seedlet/screenshot.png
  80. 1 2
      seedlet/search.php
  81. 1 2
      seedlet/single.php
  82. 18 8
      seedlet/style-rtl.css
  83. 19 9
      seedlet/style.css
  84. 1 2
      seedlet/template-parts/content/content-excerpt.php
  85. 1 2
      seedlet/template-parts/content/content-none.php
  86. 1 2
      seedlet/template-parts/content/content-page.php
  87. 1 2
      seedlet/template-parts/content/content-single.php
  88. 1 2
      seedlet/template-parts/content/content.php
  89. 1 2
      seedlet/template-parts/footer/footer-widgets.php
  90. 1 2
      seedlet/template-parts/header/entry-header.php
  91. 1 2
      seedlet/template-parts/header/site-branding.php
  92. 2 3
      seedlet/template-parts/post/author-bio.php
  93. 0 22
      varia/inc/customize-message-wpcom.js
  94. 6 2
      varia/inc/wpcom.php

+ 1 - 0
.gitignore

@@ -1,3 +1,4 @@
 node_modules
 twentynineteen/
 theme-dev-utils/
+theme-dev-utils

+ 36 - 23
balasana/functions.php

@@ -53,49 +53,52 @@ if ( ! function_exists( 'balasana_setup' ) ) :
 			)
 		);
 
-		// Add child theme editor color pallete to match Sass-map variables in `_config-child-theme-deep.scss`.
+		/*
+		 * Get customizer colors and add them to the editor color palettes
+		 *
+		 * - if the customizer color is empty, use the default
+		 */
+		$colors_array     = get_theme_mod( 'colors_manager' ); // color annotations array()
+		$primary          = ! empty( $colors_array ) ? $colors_array['colors']['link'] : '#19744C'; // $config-global--color-primary-default;
+		$secondary        = ! empty( $colors_array ) ? $colors_array['colors']['fg1'] : '#BC2213';  // $config-global--color-secondary-default;
+		$background       = ! empty( $colors_array ) ? $colors_array['colors']['bg'] : '#FFFFFF';   // $config-global--color-background-default;
+		$foreground       = ! empty( $colors_array ) ? $colors_array['colors']['txt'] : '#303030';  // $config-global--color-foreground-default;
+		$foreground_light = ( ! empty( $colors_array ) && $colors_array['colors']['txt'] != '#303030' ) ? $colors_array['colors']['txt'] : '#505050';  // $config-global--color-foreground-light-default;
+		$foreground_dark  = ( ! empty( $colors_array ) && $colors_array['colors']['txt'] != '#303030' ) ? $colors_array['colors']['txt'] : '#101010';  // $config-global--color-foreground-dark-default;
+
+		// Editor color palette.
 		add_theme_support(
 			'editor-color-palette',
 			array(
 				array(
 					'name'  => __( 'Primary', 'balasana' ),
 					'slug'  => 'primary',
-					'color' => '#19744C',
+					'color' => $primary,
 				),
 				array(
 					'name'  => __( 'Secondary', 'balasana' ),
 					'slug'  => 'secondary',
-					'color' => '#BC2213',
+					'color' => $secondary,
 				),
 				array(
-					'name'  => __( 'Dark Gray', 'balasana' ),
-					'slug'  => 'foreground-dark',
-					'color' => '#101010',
+					'name'  => __( 'Background', 'balasana' ),
+					'slug'  => 'background',
+					'color' => $background,
 				),
 				array(
-					'name'  => __( 'Gray', 'balasana' ),
+					'name'  => __( 'Foreground', 'balasana' ),
 					'slug'  => 'foreground',
-					'color' => '#303030',
+					'color' => $foreground,
 				),
 				array(
-					'name'  => __( 'Light Gray', 'balasana' ),
+					'name'  => __( 'Foreground Light', 'balasana' ),
 					'slug'  => 'foreground-light',
-					'color' => '#505050',
-				),
-				array(
-					'name'  => __( 'Lighter Gray', 'balasana' ),
-					'slug'  => 'background-dark',
-					'color' => '#D0D0D0',
-				),
-				array(
-					'name'  => __( 'Subtle Gray', 'balasana' ),
-					'slug'  => 'background-light',
-					'color' => '#F0F0F0',
+					'color' => $foreground_light,
 				),
 				array(
-					'name'  => __( 'White', 'balasana' ),
-					'slug'  => 'background',
-					'color' => '#FFFFFF',
+					'name'  => __( 'Foreground Dark', 'balasana' ),
+					'slug'  => 'foreground-dark',
+					'color' => $foreground_dark,
 				),
 			)
 		);
@@ -193,5 +196,15 @@ function balasana_editor_styles() {
 
 	// Enqueue Google fonts in the editor
 	wp_enqueue_style( 'balasana-editor-fonts', balasana_fonts_url(), array(), null );
+
+	// Hide duplicate palette colors
+	$colors_array = get_theme_mod('colors_manager', array( 'colors' => true )); // color annotations array()
+	if ( ! empty( $colors_array ) && $colors_array['colors']['txt'] != '#394d55' ) { // $config-global--color-foreground-light-default;
+		$inline_palette_css = '.components-circular-option-picker__option-wrapper:nth-child(5),
+			.components-circular-option-picker__option-wrapper:nth-child(6) {
+				display: none;
+			}';
+		wp_add_inline_style( 'wp-edit-blocks', $inline_palette_css );
+	}
 }
 add_action( 'enqueue_block_editor_assets', 'balasana_editor_styles' );

+ 453 - 0
balasana/inc/wpcom-colors.php

@@ -0,0 +1,453 @@
+<?php
+/* Custom Colors: Balasana */
+
+// Background Color (White)
+// $config-global--color-background-default
+add_color_rule( 'bg', '#FFFFFF', array(
+
+	// Background-color
+	array( '.has-background-background-color,
+			.has-background-background-color.has-background-dim,
+			.main-navigation > div,
+			.screen-reader-text:focus,
+			body,
+			body .widget_eu_cookie_law_widget #eu-cookie-law,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept', 'background-color' ),
+
+	// Background-image
+	array( '#site-navigation #toggle-menu::before,
+			#site-navigation #toggle:checked + #toggle-menu::before', 'background-image' ),
+
+	// Text-color
+	array( '.a8c-posts-list-item__featured span,
+			.a8c-posts-list__view-all,
+			.a8c-posts-list__view-all:focus,
+			.a8c-posts-list__view-all:hover,
+			.button,
+			.button:focus,
+			.button:hover,
+			.has-focus.a8c-posts-list__view-all,
+			.has-focus.button,
+			.has-focus.wp-block-button__link,
+			.has-focus.wp-block-file__button,
+			.sticky-post,
+			.wp-block-button__link,
+			.wp-block-button__link:focus,
+			.wp-block-button__link:hover,
+			.wp-block-cover.has-background-dim,
+			.wp-block-cover.has-background-dim .block-editor-block-list__block,
+			.wp-block-cover.has-background-dim .wp-block-cover-image-text,
+			.wp-block-cover.has-background-dim .wp-block-cover-text,
+			.wp-block-cover.has-background-dim .wp-block-cover__inner-container,
+			.wp-block-cover-image.has-background-dim,
+			.wp-block-cover-image.has-background-dim .block-editor-block-list__block,
+			.wp-block-cover-image.has-background-dim .wp-block-cover-image-text,
+			.wp-block-cover-image.has-background-dim .wp-block-cover-text,
+			.wp-block-cover-image.has-background-dim .wp-block-cover__inner-container,
+			.wp-block-file .wp-block-file__button,
+			.wp-block-file a.wp-block-file__button:active,
+			.wp-block-file a.wp-block-file__button:focus,
+			.wp-block-file a.wp-block-file__button:hover,
+			.wp-block-file a.wp-block-file__button:visited,
+			.wp-block-file__button,
+			.wp-block-file__button:focus,
+			.wp-block-file__button:hover,
+			.wp-block-gallery .blocks-gallery-image figcaption,
+			.wp-block-gallery .blocks-gallery-item figcaption,
+			.wp-block-pullquote.is-style-solid-color,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:focus,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:hover,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative,
+			button,
+			button.has-focus,
+			button:focus,
+			button:hover,
+			button[data-load-more-btn],
+			input.has-focus[type="submit"],
+			input:focus[type="submit"],
+			input:hover[type="submit"],
+			input[type="submit"]', 'color' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Text-color
+	array( '.has-background-color,
+			.has-foreground-dark-background-color,
+			.has-foreground-light-background-color,
+			.has-primary-background-color,
+			.has-primary-background-color.has-background-dim,
+			.has-secondary-background-color,
+			.has-secondary-background-color.has-background-dim,
+			.has-foreground-background-color,
+			.has-foreground-background-color.has-background-dim', 'color' ),
+	// Background-color
+	array( '.has-background-background-color', 'background-color' ),
+	// Text-color darkened
+	array( '.has-background-dark-color', 'color', '-1' ),
+	// Background-color darkened
+	array( '.has-background-dark-background-color', 'background-color', '-1' ),
+	// Text-color lightened
+	array( '.has-background-light-color', 'color', '+1' ),
+	// Background-color lightened
+	array( '.has-background-light-background-color', 'background-color', '+1' ),
+
+	/**
+	 * Grays
+	 * Uses a slightly darker color
+	 */
+	// Border-color
+	array( '.main-navigation > div,
+			.wp-block-code,
+			.wp-block-table td,
+			.wp-block-table th,
+			body .widget_eu_cookie_law_widget #eu-cookie-law,
+			input[type="color"],
+			input[type="date"],
+			input[type="datetime"],
+			input[type="datetime-local"],
+			input[type="email"],
+			input[type="month"],
+			input[type="number"],
+			input[type="password"],
+			input[type="range"],
+			input[type="search"],
+			input[type="tel"],
+			input[type="text"],
+			input[type="time"],
+			input[type="url"],
+			input[type="week"],
+			select,
+			table td,
+			table th,
+			textarea', 'border-color', '-1' ),
+	// Border-top-color
+	array( '.comment-list .children > li,
+			.comment-list > li,
+			.wp-block-pullquote', 'border-top-color', '-1' ),
+	// Border-bottom-color
+	array( '.comment-list,
+			.wp-block-pullquote,
+			hr,
+			hr.wp-block-separator', 'border-bottom-color', '-1' ),
+	// Color
+	array( 'hr.wp-block-separator.is-style-dots:before', 'color', '-1' ),
+	// Background-color
+	array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept.has-focus,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept:focus,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept:hover', '-1' ),
+
+
+), __( 'Background Color' ) );
+
+// Link Color (Blue)
+// $config-global--color-primary-default
+add_color_rule( 'link', '#19744C', array(
+
+	// Background-color
+	array( '.a8c-posts-list-item__featured span,
+			.a8c-posts-list__view-all,
+			.button,
+			.main-navigation #toggle:focus + #toggle-menu,
+			.sticky-post,
+			.wp-block-file__button:focus,
+			.wp-block-file__button:hover,
+			.wp-block-button__link:focus,
+			.wp-block-button__link:hover,
+			.wp-block-button__link:not([class*="background-color"]),
+			.wp-block-button__link:not([class*="background-color"]):focus,
+			.wp-block-button__link:not([class*="background-color"]):hover,
+			.wp-block-file .wp-block-file__button,
+			.wp-block-file__button,
+			.wp-block-pullquote.is-style-solid-color,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept,
+			button,
+			button[data-load-more-btn],
+			input[type="submit"],
+			.a8c-posts-list__view-all:focus,
+			.a8c-posts-list__view-all:hover,
+			.button:focus,
+			.button:hover,
+			.has-focus.a8c-posts-list__view-all,
+			.has-focus.button,
+			.has-focus.wp-block-button__link,
+			.has-focus.wp-block-file__button,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:focus,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:hover,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept,
+			button.has-focus,
+			button:focus,
+			button:hover,
+			input.has-focus[type="submit"],
+			input:focus[type="submit"],
+			input:hover[type="submit"]', 'background-color' ),
+
+	// Text-color
+	array( '.a8c-posts-list .a8c-posts-list-item__title a:active,
+			.a8c-posts-list .a8c-posts-list-item__title a:focus,
+			.a8c-posts-list .a8c-posts-list-item__title a:hover,
+			.comment-meta .comment-author .fn a:active,
+			.comment-meta .comment-author .fn a:focus,
+			.comment-meta .comment-author .fn a:hover,
+			.entry-title a:active,
+			.entry-title a:focus,
+			.entry-title a:hover,
+			.footer-navigation .footer-menu a:hover,
+			.has-primary-color,
+			.main-navigation a:hover,
+			.page-title a:active,
+			.page-title a:focus,
+			.page-title a:hover,
+			.post-navigation a:active .post-title,
+			.post-navigation a:focus .post-title,
+			.post-navigation a:hover .post-title,
+			.site-info a:hover,
+			.site-title a:hover,
+			.social-navigation a:hover,
+			.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
+			.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):active,
+			.wp-block-button.is-style-outline.wp-block-button__link:not(.has-text-color),
+			.wp-block-button.is-style-outline.wp-block-button__link:not(.has-text-color):active,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a:active,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a:focus,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a:hover,
+			a,
+			a:hover,
+			.a8c-posts-list__item .a8c-posts-list-item__meta a:active,
+			.a8c-posts-list__item .a8c-posts-list-item__meta a:hover,
+			.comment-meta .comment-metadata a:active,
+			.comment-meta .comment-metadata a:hover,
+			.entry-footer a:active,
+			.entry-footer a:hover,
+			.entry-meta a:active,
+			.entry-meta a:hover,
+			.wp-block-button.is-style-outline .wp-block-button__link.has-focus,
+			.wp-block-button.is-style-outline .wp-block-button__link:focus,
+			.wp-block-button.is-style-outline .wp-block-button__link:hover,
+			.wp-block-button.is-style-outline.wp-block-button__link.has-focus,
+			.wp-block-button.is-style-outline.wp-block-button__link:focus,
+			.wp-block-button.is-style-outline.wp-block-button__link:hover,
+			.wp-block-newspack-blocks-homepage-articles article .cat-links a:active,
+			.wp-block-newspack-blocks-homepage-articles article .cat-links a:hover,
+			.wp-block-newspack-blocks-homepage-articles article .entry-meta a:active,
+			.wp-block-newspack-blocks-homepage-articles article .entry-meta a:hover,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a:hover', 'color' ),
+
+	// Border color right
+	array( '.wp-block-quote[style*="text-align: right"],
+			.wp-block-quote[style*="text-align:right"]', 'border-right-color' ),
+
+	// Border color left
+	array( '.wp-block-quote', 'border-left-color' ),
+	
+	// Border color
+	array( 'input[type="color"]:focus,
+			input[type="date"]:focus,
+			input[type="datetime"]:focus,
+			input[type="datetime-local"]:focus,
+			input[type="email"]:focus,
+			input[type="month"]:focus,
+			input[type="number"]:focus,
+			input[type="password"]:focus,
+			input[type="range"]:focus,
+			input[type="search"]:focus,
+			input[type="tel"]:focus,
+			input[type="text"]:focus,
+			input[type="time"]:focus,
+			input[type="url"]:focus,
+			input[type="week"]:focus,
+			textarea:focus', 'border-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Background-color
+	array( '.has-primary-background-color,
+			.has-primary-background-color.has-background-dim', 'background-color' ),
+	// Text-color
+	array( '.has-primary-color', 'color' ),
+
+), __( 'Link Color' ) );
+
+// Text Color (Gray)
+// $config-global--color-foreground-default
+add_color_rule( 'txt', '#303030', array(
+
+	// Text-color
+	array( '.a8c-posts-list .a8c-posts-list-item__featured span,
+			.comment-meta .comment-metadata,
+			.footer-navigation .footer-menu,
+			.main-navigation,
+			.main-navigation a,
+			.main-navigation a:link,
+			.main-navigation a:visited,
+			.post-navigation .meta-nav,
+			.post-navigation a .post-title,
+			.screen-reader-text:focus,
+			.site-info,
+			.site-title,
+			.social-navigation a,
+			.wp-block-code,
+			.wp-block-code pre,
+			.wp-block-pullquote,
+			.wp-block-table.is-style-stripes tbody tr:nth-child(odd),
+			body,
+			body .widget_eu_cookie_law_widget #eu-cookie-law,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept,
+			input[type="color"],
+			input[type="color"]:focus,
+			input[type="date"],
+			input[type="date"]:focus,
+			input[type="datetime"],
+			input[type="datetime"]:focus,
+			input[type="datetime-local"],
+			input[type="datetime-local"]:focus,
+			input[type="email"],
+			input[type="email"]:focus,
+			input[type="month"],
+			input[type="month"]:focus,
+			input[type="number"],
+			input[type="number"]:focus,
+			input[type="password"],
+			input[type="password"]:focus,
+			input[type="range"],
+			input[type="range"]:focus,
+			input[type="search"],
+			input[type="search"]:focus,
+			input[type="tel"],
+			input[type="tel"]:focus,
+			input[type="text"],
+			input[type="text"]:focus,
+			input[type="time"],
+			input[type="time"]:focus,
+			input[type="url"],
+			input[type="url"]:focus,
+			input[type="week"],
+			input[type="week"]:focus,
+			textarea,
+			textarea:focus', 'color' ),
+
+	// Background-color
+	array( '.wp-block-cover-image.has-background-dim:not([class*="background-color"]),
+			.wp-block-cover.has-background-dim:not([class*="background-color"]),
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Foreground
+	array( '.has-foreground-color,
+			.has-background-background-color,
+			.has-background-dark-background-color,
+			.has-background-light-background-color', 'color' ),
+
+	// Background
+	array( '.has-background-dim:not([class*="background-color"]),
+			.has-foreground-background-color,
+			.has-foreground-background-color.has-background-dim', 'background-color' ),
+
+	// Text-color darkened
+	array( '.has-foreground-dark-color', 'color', '-1' ),
+	// Background-color darkened
+	array( '.has-foreground-dark-background-color,
+			.has-foreground-dark-background-color.has-background-dim', 'background-color', '-1' ),
+
+	// Text-color brightened
+	array( '.has-foreground-light-color', 'color', '+2' ),
+	// Background-color brightened
+	array( '.has-foreground-light-background-color,
+			.has-foreground-light-background-color.has-background-dim', 'background-color', '+2' ),
+
+	/**
+	 * Gray (Same as text color)
+	 */
+	// Text-color
+	array( '.a8c-posts-list__item .a8c-posts-list-item__meta,
+			.entry-footer,
+			.entry-meta,
+			.has-foreground-light-color,
+			.site-branding,
+			.wp-block-image figcaption,
+			.wp-block-latest-comments .wp-block-latest-comments__comment-date,
+			.wp-block-latest-posts .wp-block-latest-posts__post-date,
+			.wp-block-newspack-blocks-homepage-articles article .cat-links,
+			.wp-block-newspack-blocks-homepage-articles article .entry-meta,
+			.wp-block-pullquote .wp-block-pullquote__citation,
+			.wp-block-pullquote cite,
+			.wp-block-pullquote footer,
+			.wp-block-quote .wp-block-quote__citation,
+			.wp-block-quote cite,
+			.wp-block-quote footer,
+			.wp-block-quote.is-large .wp-block-quote__citation,
+			.wp-block-quote.is-large cite,
+			.wp-block-quote.is-large footer,
+			.wp-block-quote.is-style-large .wp-block-quote__citation,
+			.wp-block-quote.is-style-large cite,
+			.wp-block-quote.is-style-large footer,
+			.wp-block-video figcaption,
+			figcaption', 'color' ),
+
+), __( 'Text Color' ) );
+
+// Accent Color (Red)
+// $config-global--color-secondary-default
+add_color_rule( 'fg1', '#BC2213', array(
+
+	/**
+	 * Utility Classes
+	 */
+	// Text-color
+	array( '.has-secondary-color', 'color' ),
+
+	// Background-color
+	array( '.has-secondary-background-color,
+			.has-secondary-background-color.has-background-dim', 'background-color' ),
+
+), __( 'Secondary Color' ) );
+
+/**
+  * Custom CSS
+  */
+function balasana_custom_colors_extra_css() {
+	$colors_array = get_theme_mod( 'colors_manager' );
+	$bg           = $colors_array['colors']['bg'];
+	$link         = $colors_array['colors']['link'];
+?>
+	@media screen and (min-width: 560px) {
+		.main-navigation > div > ul > li > .sub-menu {
+			background-color: <?php echo $bg; ?>;
+		}
+		.main-navigation > div > ul > .menu-item-has-children > a::after {
+			border-top-color: currentColor;
+		}
+	}
+<?php }
+add_theme_support( 'custom_colors_extra_css', 'balasana_custom_colors_extra_css' );
+
+/**
+ * Featured Varia Palettes
+ */
+// Light
+add_color_palette( array(
+	'#FFFFFF',
+	'#1D1E1E',
+	'#C8133E',
+	'#4E2F4B',
+), 'Light' );
+// Medium
+add_color_palette( array(
+	'#EEF4F7',
+	'#242527',
+	'#35845D',
+	'#233252',
+), 'Medium' );
+// Dark
+add_color_palette( array(
+	'#1F2527',
+	'#FFFFFF',
+	'#9FD3E8',
+	'#FBE6AA',
+), 'Dark' );

+ 186 - 0
balasana/inc/wpcom-editor-colors.php

@@ -0,0 +1,186 @@
+<?php
+/*
+ * Custom Editor Colors: Balasana
+ */
+
+// Background Color (White)
+// $config-global--color-background-default
+add_editor_color_rule( 'bg', '#FFFFFF', array(
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .button,
+			#editor .editor-styles-wrapper .button.has-focus,
+			#editor .editor-styles-wrapper .button:focus,
+			#editor .editor-styles-wrapper .button:hover,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:focus,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:hover,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .has-focus.button,
+			#editor .editor-styles-wrapper .wp-block-button__link,
+			#editor .editor-styles-wrapper .wp-block-button__link.has-focus,
+			#editor .editor-styles-wrapper .wp-block-button__link:focus,
+			#editor .editor-styles-wrapper .wp-block-button__link:hover,
+			#editor .editor-styles-wrapper .wp-block-cover.has-background-dim,
+			#editor .editor-styles-wrapper .wp-block-cover.has-background-dim .block-editor-block-list__block,
+			#editor .editor-styles-wrapper .wp-block-cover.has-background-dim .wp-block-cover-image-text,
+			#editor .editor-styles-wrapper .wp-block-cover.has-background-dim .wp-block-cover-text,
+			#editor .editor-styles-wrapper .wp-block-cover.has-background-dim .wp-block-cover__inner-container,
+			#editor .editor-styles-wrapper .wp-block-cover-image.has-background-dim,
+			#editor .editor-styles-wrapper .wp-block-cover-image.has-background-dim .block-editor-block-list__block,
+			#editor .editor-styles-wrapper .wp-block-cover-image.has-background-dim .wp-block-cover-image-text,
+			#editor .editor-styles-wrapper .wp-block-cover-image.has-background-dim .wp-block-cover-text,
+			#editor .editor-styles-wrapper .wp-block-cover-image.has-background-dim .wp-block-cover__inner-container,
+			#editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper', 'background-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-primary-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-primary-background-color,
+			#editor .editor-styles-wrapper .has-secondary-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-secondary-background-color,
+			#editor .editor-styles-wrapper .has-foreground-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-background-color,
+			#editor .editor-styles-wrapper .has-foreground-dark-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-dark-background-color,
+			#editor .editor-styles-wrapper .has-foreground-light-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-light-background-color,
+			#editor .editor-styles-wrapper .has-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-color', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-background-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-background-color', 'background-color' ),
+
+	// Text-color darkened
+	array( '#editor .editor-styles-wrapper .has-background-dark-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-dark-color', 'color', '-1'  ),
+
+	// Background-color darkened
+	array( '#editor .editor-styles-wrapper .has-background-dark-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-dark-background-color', 'background-color', '-1' ),
+
+	// Text-color lightened
+	array( '#editor .editor-styles-wrapper .has-background-light-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-light-color', 'color', '+1'  ),
+
+	// Background-color lightened
+	array( '#editor .editor-styles-wrapper .has-background-light-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-light-background-color', 'background-color', '+1' ),
+
+), __( 'Background Color' ) );
+
+// Link Color (Blue)
+// $config-global--color-primary-default
+add_editor_color_rule( 'link', '#19744C', array(
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a,
+			#editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
+			#editor .editor-styles-wrapper a', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .button,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link,
+			#editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'background-color' ),
+
+	// Border-left-color
+	array( '#editor .editor-styles-wrapper .wp-block-quote', 'border-left-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-primary-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-primary-background-color', 'background-color' ),
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-primary-color', 'color' ),
+
+), __( 'Link Color' ) );
+
+// Text Color (Gray)
+// $config-global--color-foreground-default
+add_editor_color_rule( 'txt', '#303030', array(
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .editor-post-title__block .editor-post-title__input,
+			#editor .editor-styles-wrapper .wp-block-pullquote,
+			#editor .editor-styles-wrapper ', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .wp-block-cover-image.has-background-dim,
+			#editor .editor-styles-wrapper .wp-block-cover.has-background-dim', 'background-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-background-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-background-color,
+			#editor .editor-styles-wrapper .has-background-dark-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-dark-background-color,
+			#editor .editor-styles-wrapper .has-background-light-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-light-background-color,
+			#editor .editor-styles-wrapper .has-foreground-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-color', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-foreground-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-background-color', 'background-color' ),
+
+	// Text-color darkened
+	array( '#editor .editor-styles-wrapper .has-foreground-dark-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-dark-color', 'color', '-1' ),
+
+	// Background-color darkened
+	array( '#editor .editor-styles-wrapper .has-foreground-dark-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-dark-background-color', 'background-color', '-1' ),
+
+	// Text-color brightened
+	array( '#editor .editor-styles-wrapper .has-foreground-light-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-light-color', 'color', '+2' ),
+
+	// Background-color brightened
+	array( '#editor .editor-styles-wrapper .has-foreground-light-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-light-background-color', 'background-color', '+2' ),
+
+), __( 'Text Color' ) );
+
+// Accent Color (Red)
+// $config-global--color-secondary-default
+add_editor_color_rule( 'fg1', '#BC2213', array(
+
+	/**
+	 * Utility Classes
+	 */
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-secondary-color,
+			#editor .editor-styles-wrapper .wp-block .has-secondary-color', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-secondary-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-secondary-background-color', 'background-color' ),
+
+), __( 'Secondary Color' ) );
+
+
+/**
+  * Custom CSS
+  */
+function balasana_custom_colors_extra_css() { ?>
+	/* Ensure links match the front end when there's a custom background color. */
+	#editor .editor-styles-wrapper .wp-block .has-background:not(.has-background-background-color) a {
+		color: currentColor;
+	}
+<?php }
+add_theme_support( 'custom_colors_extra_css', 'balasana_custom_colors_extra_css' );

+ 21 - 0
balasana/inc/wpcom.php

@@ -0,0 +1,21 @@
+<?
+/**
+ * Adds support for wp.com-specific theme functions.
+ *
+ * @global array $themecolors
+ */
+function balasana_wpcom_setup() {
+	global $themecolors;
+
+	// Set theme colors for third party services.
+	if ( ! isset( $themecolors ) ) {
+		$themecolors = array(
+			'bg'     => 'FFFFFF', // $config-global--color-background-default
+			'border' => 'D0D0D0', // $config-global--color-border-default
+			'text'   => '303030', // $config-global--color-foreground-default
+			'link'   => '19744C', // $config-global--color-primary-default
+			'url'    => '19744C', // $config-global--color-primary-default
+		);
+	}
+}
+add_action( 'after_setup_theme', 'balasana_wpcom_setup' );

+ 1 - 1
balasana/sass/_config-child-theme-deep.scss

@@ -83,7 +83,7 @@ $config-global: (
 			"dark": #101010, // must be accessible against background
 		),
 		"background": (
-			"default": white,
+			"default": #FFFFFF,
 			"light": #F0F0F0, // must be accessible against foreground-default
 			"dark": #D0D0D0, // must be accessible against foreground-default
 		),

+ 1 - 0
balasana/sass/_extra-child-theme.scss

@@ -29,6 +29,7 @@ a,
 .entry-content .more-link {
 	text-decoration: none;
 
+	.has-background &:not(.wp-block-button__link):not(.wp-block-file__button),
 	&:active,
 	&:focus,
 	&:hover {

+ 15 - 15
balasana/style-editor.css

@@ -166,7 +166,7 @@ $grid-configuration: map-extend($grid-configuration-default, $grid-configuration
  */
 body {
 	color: #303030;
-	background-color: white;
+	background-color: #FFFFFF;
 	font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
 	font-family: var(--font-base, Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif);
 	font-size: 20px;
@@ -466,7 +466,7 @@ object {
  */
 .wp-block-a8c-blog-posts + .button {
 	line-height: 1;
-	color: white;
+	color: #FFFFFF;
 	cursor: pointer;
 	font-weight: 700;
 	font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
@@ -495,7 +495,7 @@ object {
 }
 
 .wp-block-a8c-blog-posts + .button:hover, .wp-block-a8c-blog-posts + .button:focus, .wp-block-a8c-blog-posts + .has-focus.button {
-	color: white;
+	color: #FFFFFF;
 	background-color: #145f3e;
 }
 
@@ -524,7 +524,7 @@ object {
 
 /* Default Style */
 .wp-block-button__link {
-	color: white;
+	color: #FFFFFF;
 	font-weight: 700;
 	font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
 	font-family: var(--font-base, Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif);
@@ -538,7 +538,7 @@ object {
 }
 
 .wp-block-button__link:hover, .wp-block-button__link:focus, .wp-block-button__link.has-focus {
-	color: white;
+	color: #FFFFFF;
 	background-color: #145f3e;
 }
 
@@ -563,7 +563,7 @@ object {
 
 /* Default Style */
 .button {
-	color: white;
+	color: #FFFFFF;
 	font-weight: 700;
 	font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
 	font-family: var(--font-base, Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif);
@@ -575,7 +575,7 @@ object {
 }
 
 .button:hover, .button:focus, .button.has-focus {
-	color: white;
+	color: #FFFFFF;
 	background-color: #145f3e;
 }
 
@@ -881,7 +881,7 @@ p.has-background:not(.has-background-background-color) a {
 
 .wp-block-pullquote.is-style-solid-color {
 	background-color: #19744C;
-	color: white;
+	color: #FFFFFF;
 }
 
 .wp-block-pullquote.is-style-solid-color.alignleft blockquote,
@@ -1078,7 +1078,7 @@ table.is-style-stripes tbody tr:nth-child(odd),
 
 .wp-block .has-background-color,
 .has-background-color {
-	color: white;
+	color: #FFFFFF;
 }
 
 .has-background:not(.has-background-background-color) a:not(.wp-block-button__link),
@@ -1095,31 +1095,31 @@ table.is-style-stripes tbody tr:nth-child(odd),
 .wp-block .has-primary-background-color,
 .has-primary-background-color {
 	background-color: #19744C;
-	color: white;
+	color: #FFFFFF;
 }
 
 .wp-block .has-secondary-background-color,
 .has-secondary-background-color {
 	background-color: #BC2213;
-	color: white;
+	color: #FFFFFF;
 }
 
 .wp-block .has-foreground-background-color,
 .has-foreground-background-color {
 	background-color: #303030;
-	color: white;
+	color: #FFFFFF;
 }
 
 .wp-block .has-foreground-light-background-color,
 .has-foreground-light-background-color {
 	background-color: #505050;
-	color: white;
+	color: #FFFFFF;
 }
 
 .wp-block .has-foreground-dark-background-color,
 .has-foreground-dark-background-color {
 	background-color: #101010;
-	color: white;
+	color: #FFFFFF;
 }
 
 .wp-block .has-background-light-background-color,
@@ -1136,7 +1136,7 @@ table.is-style-stripes tbody tr:nth-child(odd),
 
 .wp-block .has-background-background-color,
 .has-background-background-color {
-	background-color: white;
+	background-color: #FFFFFF;
 	color: #303030;
 }
 

+ 31 - 28
balasana/style-rtl.css

@@ -199,7 +199,7 @@ input[type="submit"],
 .wp-block-button__link,
 .wp-block-file__button, .a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept {
 	line-height: 1;
-	color: white;
+	color: #FFFFFF;
 	cursor: pointer;
 	font-weight: 700;
 	font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
@@ -249,7 +249,7 @@ input:focus[type="submit"],
 input.has-focus[type="submit"],
 .has-focus.wp-block-button__link,
 .has-focus.wp-block-file__button, .has-focus.a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept {
-	color: white;
+	color: #FFFFFF;
 	background-color: #145f3e;
 }
 
@@ -672,7 +672,7 @@ body {
 	font-weight: normal;
 	color: #303030;
 	text-align: right;
-	background-color: white;
+	background-color: #FFFFFF;
 }
 
 /**
@@ -707,7 +707,7 @@ a {
 }
 
 .screen-reader-text:focus {
-	background-color: white;
+	background-color: #FFFFFF;
 	border-radius: 3px;
 	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
 	clip: auto !important;
@@ -1328,7 +1328,7 @@ input[type="submit"],
 .wp-block-button__link,
 .wp-block-file__button, .a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept {
 	line-height: 1;
-	color: white;
+	color: #FFFFFF;
 	cursor: pointer;
 	font-weight: 700;
 	font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
@@ -1378,7 +1378,7 @@ input:focus[type="submit"],
 input.has-focus[type="submit"],
 .has-focus.wp-block-button__link,
 .has-focus.wp-block-file__button, .has-focus.a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept {
-	color: white;
+	color: #FFFFFF;
 	background-color: #145f3e;
 }
 
@@ -1635,7 +1635,7 @@ button[data-load-more-btn], .button {
 
 .wp-block-file .wp-block-file__button {
 	background-color: #19744C;
-	color: white;
+	color: #FFFFFF;
 	font-size: 0.83333rem;
 	margin-right: 16px;
 	margin-left: 16px;
@@ -1649,7 +1649,7 @@ button[data-load-more-btn], .button {
 .wp-block-file a.wp-block-file__button:focus,
 .wp-block-file a.wp-block-file__button:hover,
 .wp-block-file a.wp-block-file__button:visited {
-	color: white;
+	color: #FFFFFF;
 	opacity: .85;
 }
 
@@ -2026,7 +2026,7 @@ p.has-background {
 }
 
 .a8c-posts-list-item__featured span {
-	color: white;
+	color: #FFFFFF;
 	background-color: #19744C;
 	font-family: "Roboto Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
 	font-family: var(--font-headings, "Roboto Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif);
@@ -2136,7 +2136,7 @@ p.has-background {
 
 .wp-block-pullquote.is-style-solid-color {
 	background-color: #19744C;
-	color: white;
+	color: #FFFFFF;
 }
 
 .wp-block-pullquote.is-style-solid-color blockquote {
@@ -2466,7 +2466,7 @@ table.is-style-stripes tbody tr:nth-child(odd),
 
 .has-background-dim,
 .has-background-color {
-	color: white;
+	color: #FFFFFF;
 }
 
 .has-background:not(.has-background-background-color) a:not(.wp-block-button__link),
@@ -2483,32 +2483,32 @@ table.is-style-stripes tbody tr:nth-child(odd),
 .has-primary-background-color,
 .has-primary-background-color.has-background-dim {
 	background-color: #19744C;
-	color: white;
+	color: #FFFFFF;
 }
 
 .has-secondary-background-color,
 .has-secondary-background-color.has-background-dim {
 	background-color: #BC2213;
-	color: white;
+	color: #FFFFFF;
 }
 
 .has-background-dim,
 .has-foreground-background-color,
 .has-foreground-background-color.has-background-dim {
 	background-color: #303030;
-	color: white;
+	color: #FFFFFF;
 }
 
 .has-foreground-light-background-color,
 .has-foreground-light-background-color.has-background-dim {
 	background-color: #505050;
-	color: white;
+	color: #FFFFFF;
 }
 
 .has-foreground-dark-background-color,
 .has-foreground-dark-background-color.has-background-dim {
 	background-color: #101010;
-	color: white;
+	color: #FFFFFF;
 }
 
 .has-background-light-background-color,
@@ -2525,7 +2525,7 @@ table.is-style-stripes tbody tr:nth-child(odd),
 
 .has-background-background-color,
 .has-background-background-color.has-background-dim {
-	background-color: white;
+	background-color: #FFFFFF;
 	color: #303030;
 }
 
@@ -2869,7 +2869,7 @@ body:not(.fse-enabled) .site-description {
 
 @media only screen and (min-width: 560px) {
 	.main-navigation > div > ul > li > .sub-menu {
-		background: white;
+		background: #FFFFFF;
 		box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.2);
 		right: 0;
 		top: 100%;
@@ -3590,7 +3590,7 @@ img#wpstats {
  * - Page specific styles
  */
 .sticky-post {
-	color: white;
+	color: #FFFFFF;
 	background-color: #19744C;
 	font-family: "Roboto Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
 	font-family: var(--font-headings, "Roboto Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif);
@@ -3910,7 +3910,7 @@ body .widget_eu_cookie_law_widget.widget.top {
 }
 
 body .widget_eu_cookie_law_widget #eu-cookie-law {
-	background: white;
+	background: #FFFFFF;
 	border: 1px solid #D0D0D0;
 	color: #303030;
 	font-size: 0.83333rem;
@@ -3927,11 +3927,11 @@ body .widget_eu_cookie_law_widget #eu-cookie-law {
 body .widget_eu_cookie_law_widget #eu-cookie-law.negative {
 	background: #303030;
 	border-color: #101010;
-	color: white;
+	color: #FFFFFF;
 }
 
 body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept {
-	background: white;
+	background: #FFFFFF;
 	color: #303030;
 }
 
@@ -4042,13 +4042,16 @@ a,
 	text-decoration: none;
 }
 
-a:active, a:focus, a:hover,
+.has-background a:not(.wp-block-button__link):not(.wp-block-file__button), a:active, a:focus, a:hover, .has-background
+.wp-block-newspack-blocks-homepage-articles article .entry-meta a:not(.wp-block-button__link):not(.wp-block-file__button),
 .wp-block-newspack-blocks-homepage-articles article .entry-meta a:active,
 .wp-block-newspack-blocks-homepage-articles article .entry-meta a:focus,
-.wp-block-newspack-blocks-homepage-articles article .entry-meta a:hover,
+.wp-block-newspack-blocks-homepage-articles article .entry-meta a:hover, .has-background
+.wp-block-newspack-blocks-homepage-articles article .cat-links a:not(.wp-block-button__link):not(.wp-block-file__button),
 .wp-block-newspack-blocks-homepage-articles article .cat-links a:active,
 .wp-block-newspack-blocks-homepage-articles article .cat-links a:focus,
-.wp-block-newspack-blocks-homepage-articles article .cat-links a:hover,
+.wp-block-newspack-blocks-homepage-articles article .cat-links a:hover, .has-background
+.entry-content .more-link:not(.wp-block-button__link):not(.wp-block-file__button),
 .entry-content .more-link:active,
 .entry-content .more-link:focus,
 .entry-content .more-link:hover {
@@ -4132,7 +4135,7 @@ dt {
 }
 
 .main-navigation > div {
-	background: white;
+	background: #FFFFFF;
 	border: 1px solid #D0D0D0;
 	border-radius: 4px;
 	right: 16px;
@@ -4500,11 +4503,11 @@ body .widget_eu_cookie_law_widget #eu-cookie-law {
 
 body .widget_eu_cookie_law_widget #eu-cookie-law.negative {
 	background: rgba(48, 48, 48, 0.9);
-	color: white;
+	color: #FFFFFF;
 }
 
 body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept {
-	background: white;
+	background: #FFFFFF;
 	color: #303030;
 }
 

+ 13 - 13
balasana/style-woocommerce-rtl.css

@@ -254,7 +254,7 @@ body[class*="woocommerce"] #page .woocommerce input.button,
 body[class*="woocommerce"] #page .woocommerce .widget_shopping_cart .buttons a,
 body[class*="woocommerce"] #page .woocommerce.widget_shopping_cart .buttons a {
 	line-height: 1;
-	color: white;
+	color: #FFFFFF;
 	cursor: pointer;
 	font-weight: 700;
 	font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
@@ -364,7 +364,7 @@ body[class*="woocommerce"] #page .cart .has-focus.button,
 body[class*="woocommerce"] #page a.has-focus.added_to_cart,
 body[class*="woocommerce"] #page .woocommerce .widget_shopping_cart .buttons a.has-focus,
 body[class*="woocommerce"] #page .woocommerce.widget_shopping_cart .buttons a.has-focus {
-	color: white;
+	color: #FFFFFF;
 	background-color: #145f3e;
 }
 
@@ -535,7 +535,7 @@ body[class*="woocommerce"] #page a.remove {
 }
 
 body[class*="woocommerce"] #page a.remove:hover {
-	color: white !important;
+	color: #FFFFFF !important;
 	background: red;
 }
 
@@ -856,7 +856,7 @@ body[class*="woocommerce"] #page .main-navigation #woocommerce-toggle:checked +
 
 @media only screen and (max-width: 559px) {
 	body[class*="woocommerce"] #page .main-navigation .woocommerce-menu-container {
-		background-color: white;
+		background-color: #FFFFFF;
 		color: #303030;
 		padding: 0;
 		width: 100%;
@@ -910,7 +910,7 @@ body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-link .svg-ic
 }
 
 body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget {
-	background-color: white;
+	background-color: #FFFFFF;
 	color: #303030;
 	max-width: 100%;
 	padding: 16px 0;
@@ -951,7 +951,7 @@ body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget .wooc
 
 body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget .woocommerce-mini-cart__buttons a {
 	clear: left;
-	color: white;
+	color: #FFFFFF;
 	background-color: #19744C;
 	margin: 0;
 	float: left;
@@ -1203,9 +1203,9 @@ body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li a:hover {
 }
 
 body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li.active {
-	background-color: white;
+	background-color: #FFFFFF;
 	border-color: #D0D0D0;
-	border-bottom-color: white;
+	border-bottom-color: #FFFFFF;
 }
 
 body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li.active a {
@@ -1214,11 +1214,11 @@ body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li.active a {
 }
 
 body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li.active::before {
-	box-shadow: -2px 2px 0 white;
+	box-shadow: -2px 2px 0 #FFFFFF;
 }
 
 body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li.active::after {
-	box-shadow: 2px 2px 0 white;
+	box-shadow: 2px 2px 0 #FFFFFF;
 }
 
 body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li::before, body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li::after {
@@ -1337,7 +1337,7 @@ body[class*="woocommerce"] #page #reviews #comments .commentlist > li::before {
 body[class*="woocommerce"] .woocommerce-store-notice,
 body[class*="woocommerce"] p.demo_store {
 	background-color: #19744C;
-	color: white;
+	color: #FFFFFF;
 	position: fixed;
 	top: auto;
 	bottom: 0;
@@ -1947,7 +1947,7 @@ body[class*="woocommerce"] #page .woocommerce-ordering select {
 }
 
 .single-product #page #woocommerce-wrapper div.product div.images .woocommerce-product-gallery__wrapper .zoomImg {
-	background-color: white;
+	background-color: #FFFFFF;
 }
 
 .single-product #page #woocommerce-wrapper div.product div.images .woocommerce-product-gallery__image--placeholder {
@@ -1956,7 +1956,7 @@ body[class*="woocommerce"] #page .woocommerce-ordering select {
 
 .single-product #page #woocommerce-wrapper div.product div.images .woocommerce-product-gallery__trigger {
 	font-size: 1.2rem;
-	background: white;
+	background: #FFFFFF;
 }
 
 .single-product #page #woocommerce-wrapper div.product div.images .woocommerce-product-gallery__trigger::before {

+ 13 - 13
balasana/style-woocommerce.css

@@ -254,7 +254,7 @@ body[class*="woocommerce"] #page .woocommerce input.button,
 body[class*="woocommerce"] #page .woocommerce .widget_shopping_cart .buttons a,
 body[class*="woocommerce"] #page .woocommerce.widget_shopping_cart .buttons a {
 	line-height: 1;
-	color: white;
+	color: #FFFFFF;
 	cursor: pointer;
 	font-weight: 700;
 	font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
@@ -364,7 +364,7 @@ body[class*="woocommerce"] #page .cart .has-focus.button,
 body[class*="woocommerce"] #page a.has-focus.added_to_cart,
 body[class*="woocommerce"] #page .woocommerce .widget_shopping_cart .buttons a.has-focus,
 body[class*="woocommerce"] #page .woocommerce.widget_shopping_cart .buttons a.has-focus {
-	color: white;
+	color: #FFFFFF;
 	background-color: #145f3e;
 }
 
@@ -535,7 +535,7 @@ body[class*="woocommerce"] #page a.remove {
 }
 
 body[class*="woocommerce"] #page a.remove:hover {
-	color: white !important;
+	color: #FFFFFF !important;
 	background: red;
 }
 
@@ -856,7 +856,7 @@ body[class*="woocommerce"] #page .main-navigation #woocommerce-toggle:checked +
 
 @media only screen and (max-width: 559px) {
 	body[class*="woocommerce"] #page .main-navigation .woocommerce-menu-container {
-		background-color: white;
+		background-color: #FFFFFF;
 		color: #303030;
 		padding: 0;
 		width: 100%;
@@ -910,7 +910,7 @@ body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-link .svg-ic
 }
 
 body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget {
-	background-color: white;
+	background-color: #FFFFFF;
 	color: #303030;
 	max-width: 100%;
 	padding: 16px 0;
@@ -951,7 +951,7 @@ body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget .wooc
 
 body[class*="woocommerce"] #page .main-navigation .woocommerce-cart-widget .woocommerce-mini-cart__buttons a {
 	clear: right;
-	color: white;
+	color: #FFFFFF;
 	background-color: #19744C;
 	margin: 0;
 	float: right;
@@ -1203,9 +1203,9 @@ body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li a:hover {
 }
 
 body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li.active {
-	background-color: white;
+	background-color: #FFFFFF;
 	border-color: #D0D0D0;
-	border-bottom-color: white;
+	border-bottom-color: #FFFFFF;
 }
 
 body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li.active a {
@@ -1214,11 +1214,11 @@ body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li.active a {
 }
 
 body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li.active::before {
-	box-shadow: 2px 2px 0 white;
+	box-shadow: 2px 2px 0 #FFFFFF;
 }
 
 body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li.active::after {
-	box-shadow: -2px 2px 0 white;
+	box-shadow: -2px 2px 0 #FFFFFF;
 }
 
 body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li::before, body[class*="woocommerce"] #page .woocommerce-tabs ul.tabs li::after {
@@ -1337,7 +1337,7 @@ body[class*="woocommerce"] #page #reviews #comments .commentlist > li::before {
 body[class*="woocommerce"] .woocommerce-store-notice,
 body[class*="woocommerce"] p.demo_store {
 	background-color: #19744C;
-	color: white;
+	color: #FFFFFF;
 	position: fixed;
 	top: auto;
 	bottom: 0;
@@ -1947,7 +1947,7 @@ body[class*="woocommerce"] #page .woocommerce-ordering select {
 }
 
 .single-product #page #woocommerce-wrapper div.product div.images .woocommerce-product-gallery__wrapper .zoomImg {
-	background-color: white;
+	background-color: #FFFFFF;
 }
 
 .single-product #page #woocommerce-wrapper div.product div.images .woocommerce-product-gallery__image--placeholder {
@@ -1956,7 +1956,7 @@ body[class*="woocommerce"] #page .woocommerce-ordering select {
 
 .single-product #page #woocommerce-wrapper div.product div.images .woocommerce-product-gallery__trigger {
 	font-size: 1.2rem;
-	background: white;
+	background: #FFFFFF;
 }
 
 .single-product #page #woocommerce-wrapper div.product div.images .woocommerce-product-gallery__trigger::before {

+ 31 - 28
balasana/style.css

@@ -199,7 +199,7 @@ input[type="submit"],
 .wp-block-button__link,
 .wp-block-file__button, .a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept {
 	line-height: 1;
-	color: white;
+	color: #FFFFFF;
 	cursor: pointer;
 	font-weight: 700;
 	font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
@@ -249,7 +249,7 @@ input:focus[type="submit"],
 input.has-focus[type="submit"],
 .has-focus.wp-block-button__link,
 .has-focus.wp-block-file__button, .has-focus.a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept {
-	color: white;
+	color: #FFFFFF;
 	background-color: #145f3e;
 }
 
@@ -672,7 +672,7 @@ body {
 	font-weight: normal;
 	color: #303030;
 	text-align: left;
-	background-color: white;
+	background-color: #FFFFFF;
 }
 
 /**
@@ -707,7 +707,7 @@ a {
 }
 
 .screen-reader-text:focus {
-	background-color: white;
+	background-color: #FFFFFF;
 	border-radius: 3px;
 	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
 	clip: auto !important;
@@ -1328,7 +1328,7 @@ input[type="submit"],
 .wp-block-button__link,
 .wp-block-file__button, .a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.accept {
 	line-height: 1;
-	color: white;
+	color: #FFFFFF;
 	cursor: pointer;
 	font-weight: 700;
 	font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
@@ -1378,7 +1378,7 @@ input:focus[type="submit"],
 input.has-focus[type="submit"],
 .has-focus.wp-block-button__link,
 .has-focus.wp-block-file__button, .has-focus.a8c-posts-list__view-all, body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept {
-	color: white;
+	color: #FFFFFF;
 	background-color: #145f3e;
 }
 
@@ -1635,7 +1635,7 @@ button[data-load-more-btn], .button {
 
 .wp-block-file .wp-block-file__button {
 	background-color: #19744C;
-	color: white;
+	color: #FFFFFF;
 	font-size: 0.83333rem;
 	margin-left: 16px;
 	margin-right: 16px;
@@ -1649,7 +1649,7 @@ button[data-load-more-btn], .button {
 .wp-block-file a.wp-block-file__button:focus,
 .wp-block-file a.wp-block-file__button:hover,
 .wp-block-file a.wp-block-file__button:visited {
-	color: white;
+	color: #FFFFFF;
 	opacity: .85;
 }
 
@@ -2026,7 +2026,7 @@ p.has-background {
 }
 
 .a8c-posts-list-item__featured span {
-	color: white;
+	color: #FFFFFF;
 	background-color: #19744C;
 	font-family: "Roboto Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
 	font-family: var(--font-headings, "Roboto Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif);
@@ -2136,7 +2136,7 @@ p.has-background {
 
 .wp-block-pullquote.is-style-solid-color {
 	background-color: #19744C;
-	color: white;
+	color: #FFFFFF;
 }
 
 .wp-block-pullquote.is-style-solid-color blockquote {
@@ -2473,7 +2473,7 @@ table.is-style-stripes tbody tr:nth-child(odd),
 
 .has-background-dim,
 .has-background-color {
-	color: white;
+	color: #FFFFFF;
 }
 
 .has-background:not(.has-background-background-color) a:not(.wp-block-button__link),
@@ -2490,32 +2490,32 @@ table.is-style-stripes tbody tr:nth-child(odd),
 .has-primary-background-color,
 .has-primary-background-color.has-background-dim {
 	background-color: #19744C;
-	color: white;
+	color: #FFFFFF;
 }
 
 .has-secondary-background-color,
 .has-secondary-background-color.has-background-dim {
 	background-color: #BC2213;
-	color: white;
+	color: #FFFFFF;
 }
 
 .has-background-dim,
 .has-foreground-background-color,
 .has-foreground-background-color.has-background-dim {
 	background-color: #303030;
-	color: white;
+	color: #FFFFFF;
 }
 
 .has-foreground-light-background-color,
 .has-foreground-light-background-color.has-background-dim {
 	background-color: #505050;
-	color: white;
+	color: #FFFFFF;
 }
 
 .has-foreground-dark-background-color,
 .has-foreground-dark-background-color.has-background-dim {
 	background-color: #101010;
-	color: white;
+	color: #FFFFFF;
 }
 
 .has-background-light-background-color,
@@ -2532,7 +2532,7 @@ table.is-style-stripes tbody tr:nth-child(odd),
 
 .has-background-background-color,
 .has-background-background-color.has-background-dim {
-	background-color: white;
+	background-color: #FFFFFF;
 	color: #303030;
 }
 
@@ -2888,7 +2888,7 @@ body:not(.fse-enabled) .site-description {
 
 @media only screen and (min-width: 560px) {
 	.main-navigation > div > ul > li > .sub-menu {
-		background: white;
+		background: #FFFFFF;
 		box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.2);
 		left: 0;
 		top: 100%;
@@ -3609,7 +3609,7 @@ img#wpstats {
  * - Page specific styles
  */
 .sticky-post {
-	color: white;
+	color: #FFFFFF;
 	background-color: #19744C;
 	font-family: "Roboto Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
 	font-family: var(--font-headings, "Roboto Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif);
@@ -3939,7 +3939,7 @@ body .widget_eu_cookie_law_widget.widget.top {
 }
 
 body .widget_eu_cookie_law_widget #eu-cookie-law {
-	background: white;
+	background: #FFFFFF;
 	border: 1px solid #D0D0D0;
 	color: #303030;
 	font-size: 0.83333rem;
@@ -3956,11 +3956,11 @@ body .widget_eu_cookie_law_widget #eu-cookie-law {
 body .widget_eu_cookie_law_widget #eu-cookie-law.negative {
 	background: #303030;
 	border-color: #101010;
-	color: white;
+	color: #FFFFFF;
 }
 
 body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept {
-	background: white;
+	background: #FFFFFF;
 	color: #303030;
 }
 
@@ -4071,13 +4071,16 @@ a,
 	text-decoration: none;
 }
 
-a:active, a:focus, a:hover,
+.has-background a:not(.wp-block-button__link):not(.wp-block-file__button), a:active, a:focus, a:hover, .has-background
+.wp-block-newspack-blocks-homepage-articles article .entry-meta a:not(.wp-block-button__link):not(.wp-block-file__button),
 .wp-block-newspack-blocks-homepage-articles article .entry-meta a:active,
 .wp-block-newspack-blocks-homepage-articles article .entry-meta a:focus,
-.wp-block-newspack-blocks-homepage-articles article .entry-meta a:hover,
+.wp-block-newspack-blocks-homepage-articles article .entry-meta a:hover, .has-background
+.wp-block-newspack-blocks-homepage-articles article .cat-links a:not(.wp-block-button__link):not(.wp-block-file__button),
 .wp-block-newspack-blocks-homepage-articles article .cat-links a:active,
 .wp-block-newspack-blocks-homepage-articles article .cat-links a:focus,
-.wp-block-newspack-blocks-homepage-articles article .cat-links a:hover,
+.wp-block-newspack-blocks-homepage-articles article .cat-links a:hover, .has-background
+.entry-content .more-link:not(.wp-block-button__link):not(.wp-block-file__button),
 .entry-content .more-link:active,
 .entry-content .more-link:focus,
 .entry-content .more-link:hover {
@@ -4161,7 +4164,7 @@ dt {
 }
 
 .main-navigation > div {
-	background: white;
+	background: #FFFFFF;
 	border: 1px solid #D0D0D0;
 	border-radius: 4px;
 	left: 16px;
@@ -4529,11 +4532,11 @@ body .widget_eu_cookie_law_widget #eu-cookie-law {
 
 body .widget_eu_cookie_law_widget #eu-cookie-law.negative {
 	background: rgba(48, 48, 48, 0.9);
-	color: white;
+	color: #FFFFFF;
 }
 
 body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept {
-	background: white;
+	background: #FFFFFF;
 	color: #303030;
 }
 

+ 37 - 23
barnsbury/functions.php

@@ -53,49 +53,52 @@ if ( ! function_exists( 'barnsbury_setup' ) ) :
 			)
 		);
 
-		// Add child theme editor color pallete to match Sass-map variables in `_config-child-theme-deep.scss`.
+		/*
+		 * Get customizer colors and add them to the editor color palettes
+		 *
+		 * - if the customizer color is empty, use the default
+		 */
+		$colors_array     = get_theme_mod( 'colors_manager' ); // color annotations array()
+		$primary          = ! empty( $colors_array ) ? $colors_array['colors']['link'] : '#20603C'; // $config-global--color-primary-default;
+		$secondary        = ! empty( $colors_array ) ? $colors_array['colors']['fg1'] : '#655441';  // $config-global--color-secondary-default;
+		$background       = ! empty( $colors_array ) ? $colors_array['colors']['bg'] : '#FFFDF6';   // $config-global--color-background-default;
+		$foreground       = ! empty( $colors_array ) ? $colors_array['colors']['txt'] : '#3C2323';  // $config-global--color-foreground-default;
+		$foreground_light = ( ! empty( $colors_array ) && $colors_array['colors']['txt'] != '#3C2323' ) ? $colors_array['colors']['txt'] : '#844d4d';  // $config-global--color-foreground-light-default;
+		$foreground_dark  = ( ! empty( $colors_array ) && $colors_array['colors']['txt'] != '#3C2323' ) ? $colors_array['colors']['txt'] : '#0D1B24';  // $config-global--color-foreground-dark-default;
+
+		// Editor color palette.
 		add_theme_support(
 			'editor-color-palette',
 			array(
 				array(
 					'name'  => __( 'Primary', 'barnsbury' ),
 					'slug'  => 'primary',
-					'color' => '#20603C',
+					'color' => $primary,
 				),
 				array(
 					'name'  => __( 'Secondary', 'barnsbury' ),
 					'slug'  => 'secondary',
-					'color' => '#655441',
+					'color' => $secondary,
 				),
 				array(
-					'name'  => __( 'Deep Blue', 'barnsbury' ),
-					'slug'  => 'foreground-dark',
-					'color' => '#0D1B24',
+					'name'  => __( 'Background', 'barnsbury' ),
+					'slug'  => 'background',
+					'color' => $background,
 				),
 				array(
-					'name'  => __( 'Brown', 'barnsbury' ),
+					'name'  => __( 'Foreground', 'barnsbury' ),
 					'slug'  => 'foreground',
-					'color' => '#3C2323',
+					'color' => $foreground,
 				),
 				array(
-					'name'  => __( 'Clay', 'barnsbury' ),
+					'name'  => __( 'Foreground Light', 'balasana' ),
 					'slug'  => 'foreground-light',
-					'color' => '#844D4D',
-				),
-				array(
-					'name'  => __( 'Light Gray', 'barnsbury' ),
-					'slug'  => 'background-dark',
-					'color' => '#DDDDDD',
-				),
-				array(
-					'name'  => __( 'Subtle Off White', 'barnsbury' ),
-					'slug'  => 'background-light',
-					'color' => '#FDF9EC',
+					'color' => $foreground_light,
 				),
 				array(
-					'name'  => __( 'Off White', 'barnsbury' ),
-					'slug'  => 'background',
-					'color' => '#FFFDF6',
+					'name'  => __( 'Foreground Dark', 'balasana' ),
+					'slug'  => 'foreground-dark',
+					'color' => $foreground_dark,
 				),
 			)
 		);
@@ -171,5 +174,16 @@ function barnsbury_editor_styles() {
 
 	// Enqueue Google fonts in the editor, if necessary
 	wp_enqueue_style( 'barnsbury-editor-fonts', barnsbury_fonts_url(), array(), null );
+
+	// Hide duplicate palette colors
+	$colors_array = get_theme_mod('colors_manager', array( 'colors' => true )); // color annotations array()
+	if ( ! empty( $colors_array ) && $colors_array['colors']['txt'] != '#3C2323' ) { // $config-global--color-foreground-light-default;
+		$inline_palette_css = '.components-circular-option-picker__option-wrapper:nth-child(5),
+			.components-circular-option-picker__option-wrapper:nth-child(6) {
+				display: none;
+			}';
+		wp_add_inline_style( 'wp-edit-blocks', $inline_palette_css );
+	}
 }
 add_action( 'enqueue_block_editor_assets', 'barnsbury_editor_styles' );
+

+ 353 - 0
barnsbury/inc/wpcom-colors.php

@@ -0,0 +1,353 @@
+<?php
+/* Custom Colors: Barnsbury */
+
+// Background Color
+// $config-global--color-background-default
+add_color_rule( 'bg', '#FFFDF6', array(
+
+	// Background-color
+	array( '.has-background-background-color,
+			.has-background-background-color.has-background-dim,
+			.screen-reader-text:focus,
+			body,
+			body .widget_eu_cookie_law_widget #eu-cookie-law,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept,
+			.main-navigation > div > ul > li > .sub-menu,
+			.main-navigation > div > ul > li.current-menu-item li > a,
+			.main-navigation > div > ul > li.focus li > a,
+			.main-navigation > div > ul > li:hover li > a,
+			.main-navigation > div > ul > li:hover li:hover > a, 
+			.main-navigation > div > ul > li:hover li.focus > a, 
+			.main-navigation > div > ul > li:hover li.current-menu-item > a,
+			.main-navigation > div > ul > li.focus li:hover > a, 
+			.main-navigation > div > ul > li.focus li.focus > a, 
+			.main-navigation > div > ul > li.focus li.current-menu-item > a,
+			.main-navigation > div > ul > li.current-menu-item li:hover > a,
+			.main-navigation > div > ul > li.current-menu-item li.focus > a,
+			.main-navigation > div > ul > li.current-menu-item li.current-menu-item > a', 'background-color' ),
+
+	// Text-color
+	array( '.a8c-posts-list-item__featured span,
+			.a8c-posts-list__view-all,
+			.a8c-posts-list__view-all:focus,
+			.a8c-posts-list__view-all:hover,
+			.button,
+			.button:focus,
+			.button:hover,
+			.has-background-color,
+			.has-background-dim,
+			.has-focus.a8c-posts-list__view-all,
+			.has-focus.button,
+			.has-focus.wp-block-button__link,
+			.has-focus.wp-block-file__button,
+			.sticky-post,
+			.wp-block-button__link,
+			.wp-block-button__link:focus,
+			.wp-block-button__link:hover,
+			.wp-block-file .wp-block-file__button,
+			.wp-block-file a.wp-block-file__button:active,
+			.wp-block-file a.wp-block-file__button:focus,
+			.wp-block-file a.wp-block-file__button:hover,
+			.wp-block-file a.wp-block-file__button:visited,
+			.wp-block-file__button,
+			.wp-block-file__button:focus,
+			.wp-block-file__button:hover,
+			.wp-block-pullquote.is-style-solid-color,			
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:focus,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:hover,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative,
+			button,
+			button.has-focus,
+			button:focus,
+			button:hover,
+			button[data-load-more-btn],
+			input.has-focus[type="submit"],
+			input:focus[type="submit"],
+			input:hover[type="submit"],
+			input[type="submit"]', 'color' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Text-color
+	array( '.has-primary-background-color,
+			.has-secondary-background-color,
+			.has-foreground-background-color,
+			.has-foreground-dark-background-color,
+			.has-foreground-light-background-color,
+			.has-background-color', 'color' ),
+	// Background-color
+	array( '.has-background-background-color', 'background-color' ),
+	// Color darkened
+	array( '.has-background-dark-color', 'color', '-1' ),
+	// Background-color darkened
+	array( '.has-background-dark-background-color', 'background-color', '-1' ),
+	// Color lightened
+	array( '.has-background-light-color', 'color', '+1' ),
+	// Background-color lightened
+	array( '.has-background-light-background-color', 'background-color', '+1' ),
+
+	/**
+	 * Grays
+	 * Uses a slightly darker color
+	 */
+	// Border-color
+	array( '.main-navigation > div > ul > li > .sub-menu', 'border-color', '-1' ),
+
+), __( 'Background Color' ) );
+
+// Link Color
+// $config-global--color-primary-default
+add_color_rule( 'link', '#20603C', array(
+
+	// Background-color
+	array( '.a8c-posts-list-item__featured span,
+			.a8c-posts-list__view-all,
+			.button,
+			.sticky-post,
+			.wp-block-button__link,
+			.wp-block-file .wp-block-file__button,
+			.wp-block-file__button,
+			.wp-block-pullquote.is-style-solid-color,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept,
+			button,
+			button[data-load-more-btn],
+			input[type="submit"]', 'background-color' ),
+
+	// Text-color
+	array( '.a8c-posts-list .a8c-posts-list-item__title a:active,
+			.a8c-posts-list .a8c-posts-list-item__title a:focus,
+			.a8c-posts-list .a8c-posts-list-item__title a:hover,
+			.entry-footer a:active,
+			.entry-footer a:hover,
+			.entry-meta a:active,
+			.entry-meta a:hover,
+			.entry-title a:active,
+			.entry-title a:focus,
+			.entry-title a:hover,
+			.footer-navigation .footer-menu,
+			.page-title a:active,
+			.page-title a:focus,
+			.page-title a:hover,
+			.site-info,
+			.social-navigation a:hover,
+			.wp-block-button.is-style-outline .wp-block-button__link,
+			.wp-block-button.is-style-outline .wp-block-button__link:active,
+			.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
+			.wp-block-button.is-style-outline .wp-block-button__link:hover, 
+			.wp-block-button.is-style-outline .wp-block-button__link:focus, 
+			.wp-block-button.is-style-outline .wp-block-button__link.has-focus,
+			.wp-block-button.is-style-outline.wp-block-button__link,
+			.wp-block-button.is-style-outline.wp-block-button__link:active,
+			.wp-block-button.is-style-outline.wp-block-button__link:not(.has-text-color),
+			.wp-block-button.is-style-outline.wp-block-button__link:hover, 
+			.wp-block-button.is-style-outline.wp-block-button__link:focus, 
+			.wp-block-button.is-style-outline.wp-block-button__link.has-focus, 			
+			.wp-block-latest-posts > li > a:active,
+			.wp-block-latest-posts > li > a:focus,
+			.wp-block-latest-posts > li > a:hover,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a:active,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a:focus,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a:hover,
+			a,
+			.main-navigation > div > ul > li.current-menu-item > a,
+			.main-navigation > div > ul > li.focus > a,
+			.main-navigation > div > ul > li:hover > a,
+			.main-navigation > div > ul > li:hover li:hover > a, 
+			.main-navigation > div > ul > li:hover li.focus > a, 
+			.main-navigation > div > ul > li:hover li.current-menu-item > a,
+			.main-navigation > div > ul > li.focus li:hover > a, 
+			.main-navigation > div > ul > li.focus li.focus > a, 
+			.main-navigation > div > ul > li.focus li.current-menu-item > a,
+			.main-navigation > div > ul > li.current-menu-item li:hover > a,
+			.main-navigation > div > ul > li.current-menu-item li.focus > a,
+			.main-navigation > div > ul > li.current-menu-item li.current-menu-item > a', 'color' ),
+
+	// Border color left
+	array( '.wp-block-quote', 'border-left-color' ),
+
+	// Border color right
+	array( '.wp-block-quote[style*="text-align: right"],
+			.wp-block-quote[style*="text-align:right"]', 'border-right-color' ),
+
+	// Border color bottom
+	array( '.main-navigation > div > ul > li.current-menu-item > ul:before,
+			.main-navigation > div > ul > li.focus > ul:before,
+			.main-navigation > div > ul > li:hover > ul:before', 'border-bottom-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Background-color
+	array( '.has-primary-background-color', 'background-color' ),
+	// Text-color
+	array( '.has-primary-color', 'color' ),
+
+), __( 'Link Color' ) );
+
+// Text Color
+// $config-global--color-foreground-default
+add_color_rule( 'txt', '#3C2323', array(
+
+	// Text-color
+	array( '.comment-meta .comment-metadata,
+			.entry-footer,
+			.entry-meta,
+			.main-navigation,
+			.main-navigation a,
+			.main-navigation a:link,
+			.main-navigation a:visited,
+			.screen-reader-text:focus,
+			.social-navigation a,
+			.wp-block-code,
+			.wp-block-code pre,
+			.wp-block-latest-posts > li > a,
+			.wp-block-pullquote,
+			.wp-block-table.is-style-stripes tbody tr:nth-child(odd),
+			table.is-style-stripes tbody tr:nth-child(odd),
+			body,
+			body .widget_eu_cookie_law_widget #eu-cookie-law,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept,
+			hr.wp-block-separator.is-style-dots:before,
+			.site-title,
+			.main-navigation > div > ul > li.current-menu-item li > a,
+			.main-navigation > div > ul > li.focus li > a,
+			.main-navigation > div > ul > li:hover li > a', 'color' ),
+
+	// Background-color
+	array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative,
+			.wp-block-cover,
+			.wp-block-cover-image', 'background-color' ),
+
+	// Border-color
+	array( '.wp-block-code,
+			body .widget_eu_cookie_law_widget #eu-cookie-law,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'border-color' ),
+
+	// Border-top-color
+	array( '.comment-list .children > li,
+			.comment-list > li,
+			.wp-block-pullquote', 'border-top-color' ),
+
+	// Border-bottom-color
+	array( '.comment-list,
+			.wp-block-pullquote,
+			hr,
+			hr.wp-block-separator', 'border-bottom-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Text color
+	array( '.has-foreground-color,
+			.has-background-background-color[class],
+			.has-background-background-color.has-background-dim,
+			.has-background-dark-background-color[class],
+			.has-background-dark-background-color.has-background-dim,
+			.has-background-light-background-color[class],
+			.has-background-light-background-color.has-background-dim', 'color' ),
+
+	// Background-color
+	array( '.has-background-dim,
+			.has-foreground-background-color[class],
+			.has-foreground-background-color.has-background-dim', 'background-color' ),
+
+	// Text-color darkened
+	array( '.has-foreground-dark-color[class]', 'color', '-1' ),
+
+	// Background-color darkened
+	array( '.has-foreground-dark-background-color[class]', 'background-color', '-1' ),
+
+	// Text-color brightened
+	array( '.has-foreground-light-color[class]', 'color', '+2' ),
+
+	// Background-color brightened
+	array( '.has-foreground-light-background-color[class]', 'background-color', '+2' ),
+
+	/**
+	 * Gray (Same as text color)
+	 */
+	// Text-color
+	array( '', 'color' ),
+
+), __( 'Text Color' ) );
+
+// Accent Color
+// $config-global--color-secondary-default
+add_color_rule( 'fg1', '#655441', array(
+
+	// Text-color
+	array( '.wp-block-button.is-style-outline .wp-block-button__link:focus,
+			.wp-block-button.is-style-outline .wp-block-button__link:hover', 'color' ),
+
+	// Background-color
+	array( '.wp-block-button:not(.is-style-outline) .wp-block-button__link:focus,
+			.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover', 'background-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Text-color
+	array( '.has-secondary-color', 'color' ),
+
+	// Background-color
+	array( '.has-secondary-background-color,
+			.has-secondary-background-color.has-background-dim', 'background-color' ),
+
+), __( 'Secondary Color' ) );
+
+/**
+ * Custom CSS
+ */
+
+function barnsbury_custom_colors_extra_css() { 
+	$colors_array = get_theme_mod( 'colors_manager' );
+	$bg           = $colors_array['colors']['bg'];
+?>
+	@media screen and (min-width: 560px) {
+		
+		.main-navigation > div > ul > li > .sub-menu {
+			background-color: <?php echo $bg; ?>;
+			border: 1px solid;
+		}
+		.main-navigation > div > ul > li.current-menu-item li > a,
+		.main-navigation > div > ul > li.focus li > a,
+		.main-navigation > div > ul > li:hover li > a {
+			color: <?php echo $bg; ?>;
+		}
+		.site-header .main-navigation > div > ul > li.current-menu-item > ul::before,
+		.site-header .main-navigation > div > ul > li.focus > ul::before,
+		.site-header .main-navigation > div > ul > li:hover > ul::before {
+			border: none;
+		}
+	}
+<?php }
+add_theme_support( 'custom_colors_extra_css', 'barnsbury_custom_colors_extra_css' ); 
+
+/**
+ * Featured Varia Palettes
+ */
+// Light
+add_color_palette( array(
+	'#FFFFFF',
+	'#1D1E1E',
+	'#C8133E',
+	'#4E2F4B',
+), 'Light' );
+// Medium
+add_color_palette( array(
+	'#EEF4F7',
+	'#242527',
+	'#35845D',
+	'#233252',
+), 'Medium' );
+// Dark
+add_color_palette( array(
+	'#1F2527',
+	'#FFFFFF',
+	'#9FD3E8',
+	'#FBE6AA',
+), 'Dark' );

+ 186 - 0
barnsbury/inc/wpcom-editor-colors.php

@@ -0,0 +1,186 @@
+<?php
+/*
+ * Custom Editor Colors: Barnsbury
+ */
+
+// Background Color (White)
+// $config-global--color-background-default
+add_editor_color_rule( 'bg', '#FFFDF6', array(
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .button,
+			#editor .editor-styles-wrapper .button.has-focus,
+			#editor .editor-styles-wrapper .button:focus,
+			#editor .editor-styles-wrapper .button:hover,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:focus,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:hover,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .has-focus.button,
+			#editor .editor-styles-wrapper .wp-block-button__link:not(.has-text-color),
+			#editor .editor-styles-wrapper .wp-block-button__link.has-focus:not(.has-text-color),
+			#editor .editor-styles-wrapper .wp-block-button__link:not(.has-text-color):focus,
+			#editor .editor-styles-wrapper .wp-block-button__link:not(.has-text-color):hover,
+			#editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper', 'background-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-primary-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-primary-background-color,
+			#editor .editor-styles-wrapper .has-secondary-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-secondary-background-color,
+			#editor .editor-styles-wrapper .has-foreground-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-background-color,
+			#editor .editor-styles-wrapper .has-foreground-dark-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-dark-background-color,
+			#editor .editor-styles-wrapper .has-foreground-light-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-light-background-color,
+			#editor .editor-styles-wrapper .has-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-color', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-background-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-background-color', 'background-color' ),
+
+	// Text-color darkened
+	array( '#editor .editor-styles-wrapper .has-background-dark-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-dark-color', 'color', '-1'  ),
+
+	// Background-color darkened
+	array( '#editor .editor-styles-wrapper .has-background-dark-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-dark-background-color', 'background-color', '-1' ),
+
+	// Text-color lightened
+	array( '#editor .editor-styles-wrapper .has-background-light-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-light-color', 'color', '+1'  ),
+
+	// Background-color lightened
+	array( '#editor .editor-styles-wrapper .has-background-light-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-light-background-color', 'background-color', '+1' ),
+
+), __( 'Background Color' ) );
+
+// Link Color (Blue)
+// $config-global--color-primary-default
+add_editor_color_rule( 'link', '#20603C', array(
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
+			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline:not(.has-text-color),
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a:active,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a:focus,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a:hover,
+			#editor .editor-styles-wrapper .wp-block-latest-posts > li > a:active,
+			#editor .editor-styles-wrapper .wp-block-latest-posts > li > a:focus,
+			#editor .editor-styles-wrapper .wp-block-latest-posts > li > a:hover', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .button,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background),
+			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline,
+			#editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'background-color' ),
+
+	// Border-left-color
+	array( '#editor .editor-styles-wrapper .wp-block-quote', 'border-left-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-primary-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-primary-background-color', 'background-color' ),
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-primary-color,
+			#editor .editor-styles-wrapper .wp-block .has-primary-color', 'color' ),
+
+), __( 'Link Color' ) );
+
+// Text Color
+// $config-global--color-foreground-default
+add_editor_color_rule( 'txt', '#3C2323', array(
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .editor-post-title__block .editor-post-title__input,
+		#editor .editor-styles-wrapper .wp-block-latest-posts > li > a,
+		#editor .editor-styles-wrapper .wp-block-pullquote,
+		#editor .editor-styles-wrapper .wp-block-separator.is-style-dots:before,
+		#editor .editor-styles-wrapper hr.is-style-dots:before,
+		#editor .editor-styles-wrapper table.is-style-stripes tbody tr:nth-child(odd),
+		#editor .editor-styles-wrapper', 'color' ),
+
+	// Border-top-color
+	array( '#editor .editor-styles-wrapper .wp-block-pullquote', 'border-top-color' ),
+
+	// Border-bottom-color
+	array( '#editor .editor-styles-wrapper .wp-block-pullquote,
+			#editor .editor-styles-wrapper .wp-block-separator,
+			#editor .editor-styles-wrapper hr', 'border-bottom-color' ),
+
+	// Border-right-color
+	array( '#editor .editor-styles-wrapper .wp-block-separator[style*="text-align: right"],
+			#editor .editor-styles-wrapper .wp-block-separator[style*="text-align:right"],
+			#editor .editor-styles-wrapper hr[style*="text-align: right"],
+			#editor .editor-styles-wrapper hr[style*="text-align:right"]', 'border-right-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-background-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-background-color,
+			#editor .editor-styles-wrapper .has-background-dark-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-dark-background-color,
+			#editor .editor-styles-wrapper .has-background-light-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-light-background-color,
+			#editor .editor-styles-wrapper .has-foreground-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-color', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-foreground-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-background-color', 'background-color' ),
+
+	// Text-color darkened
+	array( '#editor .editor-styles-wrapper .has-foreground-dark-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-dark-color', 'color', '-1' ),
+
+	// Background-color darkened
+	array( '#editor .editor-styles-wrapper .has-foreground-dark-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-dark-background-color', 'background-color', '-1' ),
+
+	// Text-color brightened
+	array( '#editor .editor-styles-wrapper .has-foreground-light-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-light-color', 'color', '+2' ),
+
+	// Background-color brightened
+	array( '#editor .editor-styles-wrapper .has-foreground-light-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-light-background-color', 'background-color', '+2' ),
+
+), __( 'Text Color' ) );
+
+// Accent Color
+// $config-global--color-secondary-default
+add_editor_color_rule( 'fg1', '#655441', array(
+
+	/**
+	 * Utility Classes
+	 */
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-secondary-color,
+			#editor .editor-styles-wrapper .wp-block .has-secondary-color', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-secondary-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-secondary-background-color', 'background-color' ),
+
+), __( 'Secondary Color' ) );

+ 21 - 0
barnsbury/inc/wpcom.php

@@ -0,0 +1,21 @@
+<?
+/**
+ * Adds support for wp.com-specific theme functions.
+ *
+ * @global array $themecolors
+ */
+function barnsbury_wpcom_setup() {
+	global $themecolors;
+
+	// Set theme colors for third party services.
+	if ( ! isset( $themecolors ) ) {
+		$themecolors = array(
+			'bg'     => 'FFFDF6', // $config-global--color-background-default
+			'border' => '3C2323', // $config-global--color-border-default
+			'text'   => '3C2323', // $config-global--color-foreground-default
+			'link'   => '20603C', // $config-global--color-primary-default
+			'url'    => '20603C', // $config-global--color-primary-default
+		);
+	}
+}
+add_action( 'after_setup_theme', 'barnsbury_wpcom_setup' );

+ 36 - 23
brompton/functions.php

@@ -62,49 +62,52 @@ if ( ! function_exists( 'brompton_setup' ) ) :
 			)
 		);
 
-		// Add child theme editor color pallete to match Sass-map variables in `_config-child-theme-deep.scss`.
+		/*
+		 * Get customizer colors and add them to the editor color palettes
+		 *
+		 * - if the customizer color is empty, use the default
+		 */
+		$colors_array = get_theme_mod( 'colors_manager' ); // color annotations array()
+		$primary      = ! empty( $colors_array ) ? $colors_array['colors']['link'] : '#C04239'; // $config-global--color-primary-default;
+		$secondary    = ! empty( $colors_array ) ? $colors_array['colors']['fg1'] : '#FFFFFF';  // $config-global--color-secondary-default;
+		$background   = ! empty( $colors_array ) ? $colors_array['colors']['bg'] : '#E8E4DD';   // $config-global--color-background-default;
+		$foreground   = ! empty( $colors_array ) ? $colors_array['colors']['txt'] : '#252E36';  // $config-global--color-foreground-default;
+		$foreground_light = ( ! empty( $colors_array ) && $colors_array['colors']['txt'] != '#252E36' ) ? $colors_array['colors']['txt'] : '#666666';  // $config-global--color-foreground-light-default;
+		$foreground_dark  = ( ! empty( $colors_array ) && $colors_array['colors']['txt'] != '#252E36' ) ? $colors_array['colors']['txt'] : '#474747';  // $config-global--color-foreground-dark-default;
+
+		// Editor color palette.
 		add_theme_support(
 			'editor-color-palette',
 			array(
 				array(
 					'name'  => __( 'Primary', 'brompton' ),
 					'slug'  => 'primary',
-					'color' => '#C04239',
+					'color' => $primary,
 				),
 				array(
 					'name'  => __( 'Secondary', 'brompton' ),
 					'slug'  => 'secondary',
-					'color' => '#FFFFFF',
+					'color' => $secondary,
 				),
 				array(
-					'name'  => __( 'Dark Gray', 'brompton' ),
-					'slug'  => 'foreground-dark',
-					'color' => '#474747',
+					'name'  => __( 'Background', 'barnsbury' ),
+					'slug'  => 'background',
+					'color' => $background,
 				),
 				array(
-					'name'  => __( 'Gray', 'brompton' ),
+					'name'  => __( 'Foreground', 'barnsbury' ),
 					'slug'  => 'foreground',
-					'color' => '#505050',
+					'color' => $foreground,
 				),
 				array(
-					'name'  => __( 'Light Gray', 'brompton' ),
+					'name'  => __( 'Foreground Light', 'barnsbury' ),
 					'slug'  => 'foreground-light',
-					'color' => '#666666',
-				),
-				array(
-					'name'  => __( 'Dark Ivory', 'varia' ),
-					'slug'  => 'background-dark',
-					'color' => '#B9B6B2',
-				),
-				array(
-					'name'  => __( 'Ivory', 'varia' ),
-					'slug'  => 'background-light',
-					'color' => '#CFCDC7',
+					'color' => $foreground_light,
 				),
 				array(
-					'name'  => __( 'Light Ivory', 'brompton' ),
-					'slug'  => 'background',
-					'color' => '#E8E4DD',
+					'name'  => __( 'Foreground Dark', 'barnsbury' ),
+					'slug'  => 'foreground-dark',
+					'color' => $foreground_dark,
 				),
 			)
 		);
@@ -197,5 +200,15 @@ function brompton_editor_styles() {
 
 	// Enqueue Google fonts in the editor, if necessary
 	wp_enqueue_style( 'brompton-editor-fonts', brompton_fonts_url(), array(), null );
+
+	// Hide duplicate palette colors
+	$colors_array = get_theme_mod('colors_manager', array( 'colors' => true )); // color annotations array()
+	if ( ! empty( $colors_array ) && $colors_array['colors']['txt'] != '#505050' ) { // $config-global--color-foreground-light-default;
+		$inline_palette_css = '.components-circular-option-picker__option-wrapper:nth-child(5),
+			.components-circular-option-picker__option-wrapper:nth-child(6) {
+				display: none;
+			}';
+		wp_add_inline_style( 'wp-edit-blocks', $inline_palette_css );
+	}
 }
 add_action( 'enqueue_block_editor_assets', 'brompton_editor_styles' );

+ 502 - 0
brompton/inc/wpcom-colors.php

@@ -0,0 +1,502 @@
+<?php
+/* Custom Colors: Brompton */
+
+// Background Color
+// $config-global--color-background-default
+add_color_rule( 'bg', '#E8E4DD', array(
+
+	// Background-color
+	array( '.has-background-background-color[class],
+			.screen-reader-text:focus,
+			body,
+			body .widget_eu_cookie_law_widget #eu-cookie-law,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept,
+			.main-navigation .button', 'background-color' ),
+
+	// Text-color
+	array( '.a8c-posts-list-item__featured span,
+			.a8c-posts-list__view-all,
+			.a8c-posts-list__view-all:focus,
+			.a8c-posts-list__view-all:hover,
+			.button,
+			.button:focus,
+			.button:hover,
+			.has-background-color,
+			.has-background-dim,
+			.has-focus.a8c-posts-list__view-all,
+			.has-focus.button,
+			.has-focus.wp-block-button__link,
+			.has-focus.wp-block-file__button,
+			.sticky-post,
+			.wp-block-button__link,
+			.wp-block-button__link:focus,
+			.wp-block-button__link:hover,
+			.wp-block-cover-image:not([class*="background-color"]) .wp-block-cover-image-text,
+			.wp-block-cover-image:not([class*="background-color"]) .wp-block-cover-text,
+			.wp-block-cover-image:not([class*="background-color"]) .wp-block-cover__inner-container,
+			.wp-block-cover:not([class*="background-color"]) .wp-block-cover-image-text,
+			.wp-block-cover:not([class*="background-color"]) .wp-block-cover-text,
+			.wp-block-cover:not([class*="background-color"]) .wp-block-cover__inner-container,
+			.wp-block-file .wp-block-file__button,
+			.wp-block-file a.wp-block-file__button:active,
+			.wp-block-file a.wp-block-file__button:focus,
+			.wp-block-file a.wp-block-file__button:hover,
+			.wp-block-file a.wp-block-file__button:visited,
+			.wp-block-file__button,
+			.wp-block-file__button:focus,
+			.wp-block-file__button:hover,
+			.wp-block-pullquote.is-style-solid-color,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:focus,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:hover,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative,
+			button,
+			button.has-focus,
+			button:focus,
+			button:hover,
+			button[data-load-more-btn],
+			input.has-focus[type="submit"],
+			input:focus[type="submit"],
+			input:hover[type="submit"],
+			input[type="submit"],
+			.footer-navigation .footer-menu,
+			.main-navigation,
+			.main-navigation > div > ul > li.current-menu-item > a,
+			.main-navigation > div > ul > li:hover li > a,
+			.main-navigation a,
+			.main-navigation a:link,
+			.main-navigation a:visited,
+			.site-branding,
+			.site-info,
+			.site-title,
+			.social-navigation a', 'color' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Text-color
+	array( '.has-foreground-background-color,
+			.has-foreground-background-color.has-background-dim,
+			.has-foreground-dark-background-color,
+			.has-foreground-dark-background-color.has-background-dim,
+			.has-foreground-light-background-color,
+			.has-foreground-light-background-color.has-background-dim,
+			.has-primary-background-color,
+			.has-primary-background-color.has-background-dim,
+			.has-secondary-background-color,
+			.has-secondary-background-color.has-background-dim,
+			.has-background-color,
+			.has-background-dark-color,
+			.has-background-light-color', 'color' ),
+	// Background-color
+	array( '.has-background-background-color,
+			.has-background-background-color.has-background-dim', 'background-color' ),
+	// Background-color darkened
+	array( '.has-background-dark-color', 'color', '-1' ),
+	array( '.has-background-dark-background-color,
+			.has-background-dark-background-color.has-background-dim', 'background-color', '-1' ),
+	// Background-color lightened
+	array( '.has-background-light-color', 'color', '+1' ),
+	array( '.has-background-light-background-color,
+			.has-background-light-background-color.has-background-dim', 'background-color', '+1' ),
+
+	/**
+	 * Grays
+	 * Uses a slightly darker color
+	 */
+	// Border-color
+	array( '.wp-block-code,
+			.wp-block-table td,
+			.wp-block-table th,
+			body .widget_eu_cookie_law_widget #eu-cookie-law,
+			input[type="color"],
+			input[type="date"],
+			input[type="datetime"],
+			input[type="datetime-local"],
+			input[type="email"],
+			input[type="month"],
+			input[type="number"],
+			input[type="password"],
+			input[type="range"],
+			input[type="search"],
+			input[type="tel"],
+			input[type="text"],
+			input[type="time"],
+			input[type="url"],
+			input[type="week"],
+			select,
+			table td,
+			table th,
+			textarea', 'border-color', '-1' ),
+	// Border-top-color
+	array( '.comment-list .children > li,
+			.comment-list > li,
+			.wp-block-pullquote', 'border-top-color', '-1' ),
+	// Color
+	array( 'hr.wp-block-separator.is-style-dots:before', 'color', '-1' ),
+
+	// Background-color
+	array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept.has-focus,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept:focus,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept:hover', '-1' ),
+
+	/**
+	 * Menu Hovers
+	 * Uses a slightly less opaque color
+	 */
+	// Text-color
+	array( '#masthead a:hover,
+			.site-title a:hover,
+			.social-navigation a:hover,
+			.footer-navigation .footer-menu a:hover,
+			.site-info a:hover', 'color', 0.8 ),
+
+	// Background-color
+	array( '.main-navigation #toggle-menu:active, 
+			.main-navigation #toggle-menu:focus, 
+			.main-navigation #toggle-menu:hover', 'background-color', 0.8 ),
+
+), __( 'Background Color' ) );
+
+// Link Color
+// $config-global--color-primary-default
+add_color_rule( 'link', '#C04239', array(
+
+	// Background-color
+	array( '.a8c-posts-list-item__featured span,
+			.a8c-posts-list__view-all:focus,
+			.a8c-posts-list__view-all:hover,
+			.button:focus,
+			.button:hover,
+			.has-focus.a8c-posts-list__view-all,
+			.has-focus.button,
+			.has-focus.wp-block-button__link,
+			.has-focus.wp-block-file__button,
+			.sticky-post,
+			.wp-block-button__link:focus,
+			.wp-block-button__link:hover,
+			.wp-block-file__button:focus,
+			.wp-block-file__button:hover,
+			.wp-block-pullquote.is-style-solid-color,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:focus,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:hover,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept,
+			button.has-focus,
+			button:focus,
+			button:hover,
+			input.has-focus[type="submit"],
+			input:focus[type="submit"],
+			input:hover[type="submit"]', 'background-color' ),
+
+	// Text-color
+	array( '.a8c-posts-list .a8c-posts-list-item__meta a:active,
+			.a8c-posts-list .a8c-posts-list-item__meta a:focus,
+			.a8c-posts-list .a8c-posts-list-item__meta a:hover,
+			.a8c-posts-list .a8c-posts-list-item__title a:active,
+			.a8c-posts-list .a8c-posts-list-item__title a:focus,
+			.a8c-posts-list .a8c-posts-list-item__title a:hover,
+			.comments-area .comment-meta a:active,
+			.comments-area .comment-meta a:focus,
+			.comments-area .comment-meta a:hover,
+			.comments-area .reply a:active,
+			.comments-area .reply a:focus,
+			.comments-area .reply a:hover,
+			.entry-footer a:active,
+			.entry-footer a:focus,
+			.entry-footer a:hover,
+			.page-title a:active,
+			.page-title a:focus,
+			.page-title a:hover,
+			.pagination .nav-links > *.current,
+			.pagination .nav-links > *:active,
+			.pagination .nav-links > *:focus,
+			.pagination .nav-links > *:hover,
+			.post-navigation a:active,
+			.post-navigation a:focus,
+			.post-navigation a:hover,
+			.wp-block-button.is-style-outline .wp-block-button__link.has-focus,
+			.wp-block-button.is-style-outline .wp-block-button__link:focus,
+			.wp-block-button.is-style-outline .wp-block-button__link:hover,
+			.wp-block-button.is-style-outline.has-focus,
+			.wp-block-button.is-style-outline:focus,
+			.wp-block-button.is-style-outline:hover,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a:active,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a:focus,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a:hover,
+			a,
+			article .entry-header .entry-title a:active,
+			article .entry-header .entry-title a:focus,
+			article .entry-header .entry-title a:hover', 'color' ),
+
+	// Border color left
+	array( '.wp-block-quote', 'border-left-color' ),
+
+	// Border color right
+	array( '.wp-block-quote[style*="text-align: right"],
+			.wp-block-quote[style*="text-align:right"]', 'border-right-color' ),
+
+	// Border color bottom
+	array( '#colophon .site-info,
+			#masthead', 'border-bottom-color' ),
+
+	// Border color top
+	array( '#colophon .footer-navigation,
+			#colophon .site-info,
+			#masthead', 'border-top-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Background-color
+	array( '.has-primary-background-color,
+			.has-primary-background-color.has-background-dim', 'background-color' ),
+
+	// Text-color
+	array( '.has-primary-color', 'color' ),
+
+), __( 'Link Color' ) );
+
+// Text Color
+// $config-global--color-foreground-default
+add_color_rule( 'txt', '#252E36', array(
+
+	// Text-color
+	array( '.a8c-posts-list__item .a8c-posts-list-item__meta a:active,
+			.a8c-posts-list__item .a8c-posts-list-item__meta a:hover,
+			.comment-meta .comment-metadata,
+			.comment-meta .comment-metadata a:active,
+			.comment-meta .comment-metadata a:hover,
+			.entry-footer a:active,
+			.entry-footer a:hover,
+			.entry-meta a:active,
+			.entry-meta a:hover,
+			.main-navigation .button,
+			.pagination .nav-links > *,
+			.post-navigation .meta-nav,
+			.screen-reader-text:focus,
+			.wp-block-button.is-style-outline .wp-block-button__link:active,
+			.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
+			.wp-block-button.is-style-outline.wp-block-button__link:active,
+			.wp-block-button.is-style-outline.wp-block-button__link:not(.has-text-color),
+			.wp-block-code,
+			.wp-block-code pre,
+			.wp-block-newspack-blocks-homepage-articles article .cat-links a:active,
+			.wp-block-newspack-blocks-homepage-articles article .cat-links a:hover,
+			.wp-block-newspack-blocks-homepage-articles article .entry-meta a:active,
+			.wp-block-newspack-blocks-homepage-articles article .entry-meta a:hover,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a:hover,
+			.wp-block-pullquote,
+			.wp-block-table.is-style-stripes tbody tr:nth-child(odd),
+			table.is-style-stripes tbody tr:nth-child(odd),
+			a:hover,
+			body,
+			body .widget_eu_cookie_law_widget #eu-cookie-law,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept', 'color' ),
+
+	// Background-color
+	array( '#colophon .footer-navigation,
+			#colophon .site-info,
+			#masthead,
+			#masthead:before,
+			#page:before,
+			.a8c-posts-list__view-all,
+			.button,
+			.wp-block-button__link,
+			.wp-block-cover,
+			.wp-block-cover-image,
+			.wp-block-cover-image.has-background-dim:not([class*="background-color"]),
+			.wp-block-cover.has-background-dim:not([class*="background-color"]),
+			.wp-block-file .wp-block-file__button,
+			.wp-block-file__button,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative,
+			button,
+			button[data-load-more-btn],
+			input[type="submit"],
+			.main-navigation > div > ul > li > .sub-menu,
+			.main-navigation > div > ul > li:hover li > a, 
+			.main-navigation > div > ul > li.focus li > a, 
+			.main-navigation > div > ul > li.current-menu-item li > a', 'background-color' ),
+
+	// Border-color
+	array( 'input[type="color"]:focus,
+			input[type="date"]:focus,
+			input[type="datetime"]:focus,
+			input[type="datetime-local"]:focus,
+			input[type="email"]:focus,
+			input[type="month"]:focus,
+			input[type="number"]:focus,
+			input[type="password"]:focus,
+			input[type="range"]:focus,
+			input[type="search"]:focus,
+			input[type="tel"]:focus,
+			input[type="text"]:focus,
+			input[type="time"]:focus,
+			input[type="url"]:focus,
+			input[type="week"]:focus,
+			textarea:focus', 'border-color' ),
+
+	// Border-top-color
+	array( '.wp-block-pullquote', 'border-top-color' ),
+
+	// Border-bottom-color
+	array( '.comment-list,
+			.wp-block-pullquote,
+			hr,
+			hr.wp-block-separator', 'border-bottom-color', '-1' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Foreground
+	array( '.has-background-background-color,
+			.has-background-background-color.has-background-dim,
+			.has-background-dark-background-color,
+			.has-background-dark-background-color.has-background-dim,
+			.has-background-light-background-color,
+			.has-background-light-background-color.has-background-dim,
+			.has-foreground-color', 'color' ),
+
+	array( '.has-background-dim,
+			.has-foreground-background-color,
+			.has-foreground-background-color.has-background-dim', 'background-color' ),
+
+	// Text-color darkened
+	array( '.has-foreground-dark-color[class]', 'color', '-1' ),
+	// Background-color darkened
+	array( '.has-foreground-dark-background-color[class]', 'background-color', '-1' ),
+
+	// Text-color brightened
+	array( '.has-foreground-light-color[class]', 'color', '+2' ),
+	// Background-color brightened
+	array( '.has-foreground-light-background-color[class]', 'background-color', '+2' ),
+
+	/**
+	 * Gray (Same as text color)
+	 */
+	// Text-color
+	array( '.a8c-posts-list__item .a8c-posts-list-item__meta,
+			.comments-area .reply,
+			.entry-footer,
+			.entry-meta,
+			.has-foreground-light-color[class],
+			.post-navigation a,
+			.wp-block-image figcaption,
+			.wp-block-latest-comments .wp-block-latest-comments__comment-date,
+			.wp-block-latest-posts .wp-block-latest-posts__post-date,
+			.wp-block-newspack-blocks-homepage-articles article .cat-links,
+			.wp-block-newspack-blocks-homepage-articles article .entry-meta,
+			.wp-block-pullquote .wp-block-pullquote__citation,
+			.wp-block-pullquote cite,
+			.wp-block-pullquote footer,
+			.wp-block-quote .wp-block-quote__citation,
+			.wp-block-quote cite,
+			.wp-block-quote footer,
+			.wp-block-quote.is-large .wp-block-quote__citation,
+			.wp-block-quote.is-large cite,
+			.wp-block-quote.is-large footer,
+			.wp-block-quote.is-style-large .wp-block-quote__citation,
+			.wp-block-quote.is-style-large cite,
+			.wp-block-quote.is-style-large footer,
+			.wp-block-video figcaption,
+			figcaption', 'color' ),
+
+), __( 'Text Color' ) );
+
+// Accent Color
+// $config-global--color-secondary-default
+add_color_rule( 'fg1', '#FFFFFF', array(
+
+	/**
+	 * Utility Classes
+	 */
+	// Text-color
+	array( '.has-secondary-color', 'color' ),
+
+	// Background-color
+	array( '.has-secondary-background-color,
+			.has-secondary-background-color.has-background-dim', 'background-color' ),
+
+), __( 'Secondary Color' ) );
+
+/**
+ * Custom CSS
+ */
+
+function brompton_custom_colors_extra_css() { 
+	$colors_array = get_theme_mod( 'colors_manager' );
+	$bg           = $colors_array['colors']['bg'];
+?>
+
+	input[type="color"],
+	input[type="color"]:focus,
+	input[type="date"],
+	input[type="date"]:focus,
+	input[type="datetime"],
+	input[type="datetime"]:focus,
+	input[type="datetime-local"],
+	input[type="datetime-local"]:focus,
+	input[type="email"],
+	input[type="email"]:focus,
+	input[type="month"],
+	input[type="month"]:focus,
+	input[type="number"],
+	input[type="number"]:focus,
+	input[type="password"],
+	input[type="password"]:focus,
+	input[type="range"],
+	input[type="range"]:focus,
+	input[type="search"],
+	input[type="search"]:focus,
+	input[type="tel"],
+	input[type="tel"]:focus,
+	input[type="text"],
+	input[type="text"]:focus,
+	input[type="time"],
+	input[type="time"]:focus,
+	input[type="url"],
+	input[type="url"]:focus,
+	input[type="week"],
+	input[type="week"]:focus,
+	textarea,
+	textarea:focus {
+	    	color: black;
+	    	background: white;
+	}
+
+	@media screen and (min-width: 560px) {
+		.main-navigation > div > ul > li:hover li > a, 
+		.main-navigation > div > ul > li.focus li > a, 
+		.main-navigation > div > ul > li.current-menu-item li > a {
+			border-top-color: currentColor;
+		}
+	}
+<?php }
+add_theme_support( 'custom_colors_extra_css', 'brompton_custom_colors_extra_css' ); 
+
+/**
+ * Featured Varia Palettes
+ */
+// Light
+add_color_palette( array(
+	'#FFFFFF',
+	'#1D1E1E',
+	'#C8133E',
+	'#4E2F4B',
+), 'Light' );
+// Medium
+add_color_palette( array(
+	'#EEF4F7',
+	'#242527',
+	'#35845D',
+	'#233252',
+), 'Medium' );
+// Dark
+add_color_palette( array(
+	'#1F2527',
+	'#FFFFFF',
+	'#9FD3E8',
+	'#FBE6AA',
+), 'Dark' );

+ 224 - 0
brompton/inc/wpcom-editor-colors.php

@@ -0,0 +1,224 @@
+<?php
+/*
+ * Custom Editor Colors: Brompton
+ */
+
+// Background Color (White)
+// $config-global--color-background-default
+add_editor_color_rule( 'bg', '#E8E4DD', array(
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .button,
+			#editor .editor-styles-wrapper .button.has-focus,
+			#editor .editor-styles-wrapper .button:focus,
+			#editor .editor-styles-wrapper .button:hover,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:focus,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:hover,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .has-focus.button,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-button) .wp-block-button__link,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-button) .wp-block-button__link.has-focus,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-button) .wp-block-button__link:focus,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-button) .wp-block-button__link:hover,
+			#editor .editor-styles-wrapper .wp-block-cover,
+			#editor .editor-styles-wrapper .wp-block-cover.has-background-dim:not([class*="background-background-color"]),
+			#editor .editor-styles-wrapper .wp-block-cover:not([class*="background-color"]) .block-editor-block-list__block,
+			#editor .editor-styles-wrapper .wp-block-cover:not([class*="background-color"]) .wp-block-cover-image-text,
+			#editor .editor-styles-wrapper .wp-block-cover:not([class*="background-color"]) .wp-block-cover-text,
+			#editor .editor-styles-wrapper .wp-block-cover:not([class*="background-color"]) .wp-block-cover__inner-container,
+			#editor .editor-styles-wrapper .wp-block-cover-image,
+			#editor .editor-styles-wrapper .wp-block-cover-image.has-background-dim:not([class*="background-background-color"]),
+			#editor .editor-styles-wrapper .wp-block-cover-image:not([class*="background-color"]) .block-editor-block-list__block,
+			#editor .editor-styles-wrapper .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover-image-text,
+			#editor .editor-styles-wrapper .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover-text,
+			#editor .editor-styles-wrapper .wp-block-cover-image:not([class*="background-color"]) .wp-block-cover__inner-container,
+			#editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'color' ),
+
+	// Color
+	array( 'hr.wp-block-separator.is-style-dots:before', 'color', '-1' ),
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper', 'background-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-background-color,
+			#editor .editor-styles-wrapper .has-foreground-background-color,
+			#editor .editor-styles-wrapper .has-foreground-dark-background-color,
+			#editor .editor-styles-wrapper .has-foreground-light-background-color,
+			#editor .editor-styles-wrapper .has-primary-background-color,
+			#editor .editor-styles-wrapper .has-secondary-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-dark-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-light-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-primary-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-secondary-background-color', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-background-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-background-color', 'background-color' ),
+
+	// Text-color darkened
+	array( '#editor .editor-styles-wrapper .has-background-dark-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-dark-color', 'color', '-1'  ),
+
+	// Background-color darkened
+	array( '#editor .editor-styles-wrapper .has-background-dark-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-dark-background-color', 'background-color', '-1' ),
+
+	// Text-color lightened
+	array( '#editor .editor-styles-wrapper .has-background-light-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-light-color', 'color', '+1'  ),
+
+	// Background-color lightened
+	array( '#editor .editor-styles-wrapper .has-background-light-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-light-background-color', 'background-color', '+1' ),
+
+), __( 'Background Color' ) );
+
+// Link Color (Blue)
+// $config-global--color-primary-default
+add_editor_color_rule( 'link', '#C04239', array(
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a:hover,
+			#editor .editor-styles-wrapper a', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .button.has-focus,
+			#editor .editor-styles-wrapper .button:focus,
+			#editor .editor-styles-wrapper .button:hover,
+			#editor .editor-styles-wrapper .has-primary-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-primary-background-color,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:focus,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:hover,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .has-focus.button,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link.has-focus,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
+			#editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'background-color' ),
+			
+	array( '#editor .editor-styles-wrapper .wp-block-quote', 'border-left-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-primary-color,
+			#editor .editor-styles-wrapper .wp-block .has-primary-color', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-primary-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-primary-background-color', 'background-color' ),
+
+), __( 'Link Color' ) );
+
+// Text Color (Gray)
+// $config-global--color-foreground-default
+add_editor_color_rule( 'txt', '#252E36', array(
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .editor-post-title__block .editor-post-title__input,
+			#editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link, 
+			#editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link.has-focus,
+			#editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:focus,
+			#editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:hover,
+			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline,
+			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline.has-focus,
+			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline:focus,
+			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline:hover,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
+			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline.has-focus,
+			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline:focus,
+			#editor .editor-styles-wrapper .wp-block-button__link.is-style-outline:hover,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .cat-links a:active,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .cat-links a:hover,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-meta a:active,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-meta a:hover,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a:hover,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .more-link:active,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .more-link:hover,
+			#editor .editor-styles-wrapper .wp-block-pullquote,
+			#editor .editor-styles-wrapper .wp-block-table.is-style-stripes tbody tr:nth-child(odd),
+			#editor .editor-styles-wrapper table.is-style-stripes tbody tr:nth-child(odd),
+			#editor .editor-styles-wrapper a:hover,
+			#editor .editor-styles-wrapper', 'color' ),
+
+	// Border-top-color
+	array( '#editor .editor-styles-wrapper .wp-block-pullquote', 'border-top-color' ),
+
+	// Border-bottom-color
+	array( '#editor .editor-styles-wrapper .comment-list, 
+			#editor .editor-styles-wrapper .wp-block-pullquote, 
+			#editor .editor-styles-wrapper hr, 
+			#editor .editor-styles-wrapper hr.wp-block-separator', 'border-bottom-color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .button,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link,
+			#editor .editor-styles-wrapper .wp-block-cover-image,
+			#editor .editor-styles-wrapper .wp-block-cover-image.has-background-dim,
+			#editor .editor-styles-wrapper .wp-block-cover,
+			#editor .editor-styles-wrapper .wp-block-cover.has-background-dim', 'background-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-background-background-color,
+			#editor .editor-styles-wrapper .has-background-dark-background-color,
+			#editor .editor-styles-wrapper .has-background-light-background-color,
+			#editor .editor-styles-wrapper .has-foreground-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-dark-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-background-light-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-color', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-foreground-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-background-color', 'background-color' ),
+
+	// Text-color darkened
+	array( '#editor .editor-styles-wrapper .has-foreground-dark-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-dark-color', 'color', '-1' ),
+
+	// Background-color darkened
+	array( '#editor .editor-styles-wrapper .has-foreground-dark-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-dark-background-color', 'background-color', '-1' ),
+
+	// Text-color brightened
+	array( '#editor .editor-styles-wrapper .has-foreground-light-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-light-color', 'color', '+2' ),
+
+	// Background-color brightened
+	array( '#editor .editor-styles-wrapper .has-foreground-light-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-foreground-light-background-color', 'background-color', '+2' ),
+
+), __( 'Text Color' ) );
+
+// Accent Color (Red)
+// $config-global--color-secondary-default
+add_editor_color_rule( 'fg1', '#FFFFFF', array(
+
+	/**
+	 * Utility Classes
+	 */
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-secondary-color,
+			#editor .editor-styles-wrapper .wp-block .has-secondary-color', 'color' ),
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-secondary-background-color,
+			#editor .editor-styles-wrapper .wp-block .has-secondary-background-color', 'background-color' ),
+
+), __( 'Secondary Color' ) );

+ 21 - 0
brompton/inc/wpcom.php

@@ -0,0 +1,21 @@
+<?
+/**
+ * Adds support for wp.com-specific theme functions.
+ *
+ * @global array $themecolors
+ */
+function brompton_wpcom_setup() {
+	global $themecolors;
+
+	// Set theme colors for third party services.
+	if ( ! isset( $themecolors ) ) {
+		$themecolors = array(
+			'bg'     => 'E8E4DD', // $config-global--color-background-default
+			'border' => 'B9B6B2', // $config-global--color-border-default
+			'text'   => '252E36', // $config-global--color-foreground-default
+			'link'   => 'C04239', // $config-global--color-primary-default
+			'url'    => 'C04239', // $config-global--color-primary-default
+		);
+	}
+}
+add_action( 'after_setup_theme', 'brompton_wpcom_setup' );

+ 5 - 5
brompton/package-lock.json

@@ -546,7 +546,7 @@
       "requires": {
         "bluebird": "3.5.5",
         "chokidar": "3.0.2",
-        "lodash": "4.17.15",
+        "lodash": "^4.17.19",
         "yargs": "13.3.0"
       },
       "dependencies": {
@@ -1520,7 +1520,7 @@
       "dev": true,
       "requires": {
         "glob": "~7.1.1",
-        "lodash": "~4.17.10",
+        "lodash": "^4.17.19",
         "minimatch": "~3.0.2"
       }
     },
@@ -2414,7 +2414,7 @@
         "get-stdin": "^4.0.1",
         "glob": "^7.0.3",
         "in-publish": "^2.0.0",
-        "lodash": "^4.17.15",
+        "lodash": "^4.17.19",
         "meow": "^3.7.0",
         "mkdirp": "^0.5.1",
         "nan": "^2.13.2",
@@ -3733,7 +3733,7 @@
       "dev": true,
       "requires": {
         "chalk": "^2.4.1",
-        "lodash": "^4.17.11",
+        "lodash": "^4.17.19",
         "log-symbols": "^2.2.0",
         "postcss": "^7.0.7"
       },
@@ -4058,7 +4058,7 @@
       "dev": true,
       "requires": {
         "glob": "^7.0.0",
-        "lodash": "^4.0.0",
+        "lodash": "^4.17.19",
         "scss-tokenizer": "^0.2.3",
         "yargs": "^13.3.2"
       }

+ 9 - 0
brompton/sass/_extra-child-theme.scss

@@ -171,6 +171,10 @@
 			padding-right: #{map-deep-get($config-header, "main-nav", "link-padding")};
 		}
 
+		& > div > ul > li > .sub-menu {
+			background: #{map-deep-get($config-global, "color", "foreground", "default")};
+		}
+
 		& > div > ul > li:hover,
 		& > div > ul > li.focus,
 		& > div > ul > li.current-menu-item {
@@ -643,6 +647,11 @@ table,
 		border-bottom: 1px solid map-deep-get($config-global, "color", "border", "light");
 		list-style: none;
 		margin-left: 0;
+		padding-left: 0;
+
+		li > ul {
+			padding-left: inherit;			
+		}
 	}
 
 	li {

+ 22 - 0
brompton/style-rtl.css

@@ -4173,6 +4173,9 @@ body.admin-bar .widget_eu_cookie_law_widget.widget.top {
 	.main-navigation > div > ul > li:last-of-type > a {
 		padding-left: 16px;
 	}
+	.main-navigation > div > ul > li > .sub-menu {
+		background: #252E36;
+	}
 	.main-navigation > div > ul > li:hover > ul,
 	.main-navigation > div > ul > li.focus > ul,
 	.main-navigation > div > ul > li.current-menu-item > ul {
@@ -4608,6 +4611,25 @@ table th,
 	border-bottom: 1px solid #CFCDC7;
 	list-style: none;
 	margin-right: 0;
+	padding-right: 0;
+}
+
+.widget_archive ul li > ul,
+.widget_categories ul li > ul,
+.widget_links ul li > ul,
+.widget_meta ul li > ul,
+.widget_nav_menu ul li > ul,
+.widget_pages ul li > ul,
+.widget_recent_comments ul li > ul,
+.widget_recent_entries ul li > ul,
+.widget_rss ul li > ul,
+.widget_rss_links ul li > ul,
+.widget_top-posts ul li > ul,
+.widget_authors ul li > ul,
+.widget_jp_blogs_i_follow ul li > ul,
+.widget_top-click ul li > ul,
+.widget_upcoming_events_widget ul li > ul {
+	padding-right: inherit;
 }
 
 .widget_archive li,

+ 22 - 0
brompton/style.css

@@ -4202,6 +4202,9 @@ body.admin-bar .widget_eu_cookie_law_widget.widget.top {
 	.main-navigation > div > ul > li:last-of-type > a {
 		padding-right: 16px;
 	}
+	.main-navigation > div > ul > li > .sub-menu {
+		background: #252E36;
+	}
 	.main-navigation > div > ul > li:hover > ul,
 	.main-navigation > div > ul > li.focus > ul,
 	.main-navigation > div > ul > li.current-menu-item > ul {
@@ -4637,6 +4640,25 @@ table th,
 	border-bottom: 1px solid #CFCDC7;
 	list-style: none;
 	margin-left: 0;
+	padding-left: 0;
+}
+
+.widget_archive ul li > ul,
+.widget_categories ul li > ul,
+.widget_links ul li > ul,
+.widget_meta ul li > ul,
+.widget_nav_menu ul li > ul,
+.widget_pages ul li > ul,
+.widget_recent_comments ul li > ul,
+.widget_recent_entries ul li > ul,
+.widget_rss ul li > ul,
+.widget_rss_links ul li > ul,
+.widget_top-posts ul li > ul,
+.widget_authors ul li > ul,
+.widget_jp_blogs_i_follow ul li > ul,
+.widget_top-click ul li > ul,
+.widget_upcoming_events_widget ul li > ul {
+	padding-left: inherit;
 }
 
 .widget_archive li,

+ 54 - 24
dalston/functions.php

@@ -53,49 +53,53 @@ if ( ! function_exists( 'dalston_setup' ) ) :
 			)
 		);
 
-		// Add child theme editor color pallete to match Sass-map variables in `_config-child-theme-deep.scss`.
+		/*
+		 * Get customizer colors and add them to the editor color palettes
+		 *
+		 * - if the customizer color is empty, use the default
+		 */
+		$colors_array = get_theme_mod( 'colors_manager' ); // color annotations array()
+		$primary      = ! empty( $colors_array ) ? $colors_array['colors']['link'] : '#0073AA'; // $config-global--color-primary-default;
+		$secondary    = ! empty( $colors_array ) ? $colors_array['colors']['fg1'] : '#0D1B24';  // $config-global--color-secondary-default;
+		$background   = ! empty( $colors_array ) ? $colors_array['colors']['bg'] : '#FFFFFF';   // $config-global--color-background-default;
+		$foreground   = ! empty( $colors_array ) ? $colors_array['colors']['txt'] : '#1E1E1E';  // $config-global--color-foreground-default;
+		$foreground_light = ( ! empty( $colors_array ) && $colors_array['colors']['txt'] != '#1E1E1E' ) ? $colors_array['colors']['txt'] : '#767676';  // $config-global--color-foreground-light-default;
+		$foreground_dark  = ( ! empty( $colors_array ) && $colors_array['colors']['txt'] != '#1E1E1E' ) ? $colors_array['colors']['txt'] : '#000000';  // $config-global--color-foreground-dark-default;
+
+
+		// Editor color palette.
 		add_theme_support(
 			'editor-color-palette',
 			array(
 				array(
 					'name'  => __( 'Primary', 'dalston' ),
 					'slug'  => 'primary',
-					'color' => '#0073AA',
+					'color' => $primary,
 				),
 				array(
 					'name'  => __( 'Secondary', 'dalston' ),
 					'slug'  => 'secondary',
-					'color' => '#0D1B24',
-				),
-				array(
-					'name'  => __( 'Dark Blue', 'dalston' ),
-					'slug'  => 'foreground-light',
-					'color' => '#005177',
-				),
-				array(
-					'name'  => __( 'Black', 'dalston' ),
-					'slug'  => 'foreground-dark',
-					'color' => '#000000',
+					'color' => $secondary,
 				),
 				array(
-					'name'  => __( 'Gray', 'dalston' ),
+					'name'  => __( 'Foreground', 'dalston' ),
 					'slug'  => 'foreground',
-					'color' => '#1E1E1E',
+					'color' => $foreground,
 				),
 				array(
-					'name'  => __( 'Lighter Gray', 'dalston' ),
-					'slug'  => 'background-dark',
-					'color' => '#DDDDDD',
+					'name'  => __( 'Background', 'dalston' ),
+					'slug'  => 'background',
+					'color' => $background,
 				),
 				array(
-					'name'  => __( 'Subtle Gray', 'dalston' ),
-					'slug'  => 'background-light',
-					'color' => '#FAFAFA',
+					'name'  => __( 'Foreground Light', 'dalston' ),
+					'slug'  => 'foreground-light',
+					'color' => $foreground_light,
 				),
 				array(
-					'name'  => __( 'White', 'dalston' ),
-					'slug'  => 'background',
-					'color' => '#FFFFFF',
+					'name'  => __( 'Foreground Dark', 'dalston' ),
+					'slug'  => 'foreground-dark',
+					'color' => $foreground_dark,
 				),
 			)
 		);
@@ -188,6 +192,16 @@ function dalston_editor_styles() {
 
 	// Enqueue Google fonts in the editor, if necessary
 	wp_enqueue_style( 'dalston-editor-fonts', dalston_fonts_url(), array(), null );
+
+	// Hide duplicate palette colors
+	$colors_array = get_theme_mod('colors_manager', array( 'colors' => true )); // color annotations array()
+	if ( ! empty( $colors_array ) && $colors_array['colors']['txt'] != '#1E1E1E' ) { // $config-global--color-foreground-light-default;
+		$inline_palette_css = '.block-editor-color-gradient-control .components-circular-option-picker__option-wrapper:nth-child(5),
+			.block-editor-color-gradient-control .components-circular-option-picker__option-wrapper:nth-child(6) {
+				display: none;
+			}';
+		wp_add_inline_style( 'wp-edit-blocks', $inline_palette_css );
+	}
 }
 add_action( 'enqueue_block_editor_assets', 'dalston_editor_styles' );
 
@@ -196,6 +210,11 @@ add_action( 'enqueue_block_editor_assets', 'dalston_editor_styles' );
  */
 function dalston_block_extends() {
 
+	// Bail out early while in AMP endpoint.
+	if ( dalston_is_amp() ) {
+		return;
+	}
+
 	// Cover Block Tweaks
 	wp_enqueue_script( 'dalston-extend-cover-block',
 		get_stylesheet_directory_uri() . '/block-extends/extend-cover-block.js',
@@ -227,3 +246,14 @@ function dalston_block_extends() {
 	);
 }
 add_action( 'enqueue_block_assets', 'dalston_block_extends' );
+
+/**
+ * Whether this is an AMP endpoint.
+ *
+ * @see https://github.com/Automattic/amp-wp/blob/e4472bfa5c304b6c1b968e533819e3fa96579ad4/includes/amp-helper-functions.php#L248
+ * @return bool
+ */
+function dalston_is_amp() {
+	return function_exists( 'is_amp_endpoint' ) && is_amp_endpoint();
+}
+

+ 452 - 0
dalston/inc/wpcom-colors.php

@@ -0,0 +1,452 @@
+<?php
+/* Custom Colors: Dalston */
+
+// Background Color
+// $config-global--color-background-default
+add_color_rule( 'bg', '#FFFFFF', array(
+
+	// Background-color
+	array( '.screen-reader-text:focus,
+			body,
+			body .widget_eu_cookie_law_widget #eu-cookie-law,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept,
+			.main-navigation > div > ul > li > .sub-menu,
+			.sticky-post,
+			.site-header .main-navigation > div > ul > li.current-menu-item li > a,
+			.site-header .main-navigation > div > ul > li.focus li > a,
+			.site-header .main-navigation > div > ul > li:hover li > a,
+			.site-header .main-navigation > div > ul > li:hover li:hover > a, .site-header .main-navigation > div > ul > li:hover li.focus > a, .site-header .main-navigation > div > ul > li:hover li.current-menu-item > a, 
+			.site-header .main-navigation > div > ul > li.focus li:hover > a, .site-header .main-navigation > div > ul > li.focus li.focus > a, 
+			.site-header .main-navigation > div > ul > li.focus li.current-menu-item > a, .site-header .main-navigation > div > ul > li.current-menu-item li:hover > a, 
+			.site-header .main-navigation > div > ul > li.current-menu-item li.focus > a, 
+			.site-header .main-navigation > div > ul > li.current-menu-item li.current-menu-item > a', 'background-color' ),
+
+	// Text-color
+	array( '.a8c-posts-list-item__featured span,
+			.a8c-posts-list__view-all,
+			.a8c-posts-list__view-all:focus,
+			.a8c-posts-list__view-all:hover,
+			.a8c-posts-list__view-all.has-focus,
+			.entry .entry-content .wp-block-media-text,
+			.button,
+			.button:focus,
+			.button:hover,
+			.button.has-focus,
+			.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color).has-focus,
+			.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color),
+			.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color):focus,
+			.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color):hover,
+			.wp-block-file .wp-block-file__button,
+			.wp-block-file .wp-block-file__button.has-focus,
+			.wp-block-file a.wp-block-file__button:active,
+			.wp-block-file a.wp-block-file__button:focus,
+			.wp-block-file a.wp-block-file__button:hover,
+			.wp-block-file a.wp-block-file__button:visited,
+			.wp-block-file__button,
+			.wp-block-file__button:focus,
+			.wp-block-file__button:hover,
+			.wp-block-pullquote.is-style-solid-color,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:focus,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:hover,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative,
+			button,
+			button.has-focus,
+			button:focus,
+			button:hover,
+			button[data-load-more-btn],
+			input.has-focus[type="submit"],
+			input:focus[type="submit"],
+			input:hover[type="submit"],
+			input[type="submit"]', 'color' ),
+
+	// Border-color
+	array( '.entry .entry-content .wp-block-media-text.is-style-inset-borders:before', 'border-color' ),
+
+	/**
+	 * Grays
+	 * Uses a slightly darker color
+	 */
+	// Border-color
+	array( '.wp-block-code,
+			body .widget_eu_cookie_law_widget #eu-cookie-law,
+			input[type="color"],
+			input[type="date"],
+			input[type="datetime"],
+			input[type="datetime-local"],
+			input[type="email"],
+			input[type="month"],
+			input[type="number"],
+			input[type="password"],
+			input[type="range"],
+			input[type="search"],
+			input[type="tel"],
+			input[type="text"],
+			input[type="time"],
+			input[type="url"],
+			input[type="week"],
+			select,
+			textarea', 'border-color', '-1' ),
+	// Border-top-color
+	array( '.comment-list .children > li,
+			.comment-list > li', 'border-top-color', '-1' ),
+	// Border-bottom-color
+	array( '.comment-list,
+			hr,
+			hr.wp-block-separator', 'border-bottom-color', '-1' ),
+	// Color
+	array( 'hr.wp-block-separator.is-style-dots:before', 'color', '-1' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Text-color
+	array( '.has-primary-background-color[class],
+			.has-secondary-background-color[class],
+			.has-foreground-background-color[class],
+			.has-foreground-dark-background-color[class],
+			.has-foreground-light-background-color[class],
+			.has-background-color[class],
+			.has-background-dark-color[class],
+			.has-background-light-color[class]', 'color' ),
+	// Background-color
+	array( '.has-background-background-color[class],
+			.has-background-background-color[class].has-background-dim', 'background-color' ),
+
+	// Text-color darkened
+	array( '.has-background-dark-color[class]', 'color', '-1' ),
+	// Background-color darkened
+	array( '.has-background-dark-background-color[class],
+			.has-background-dark-background-color[class].has-background-dim', 'background-color', '-1' ),
+
+	// Text-color lightened
+	array( '.has-background-light-color[class]', 'color', '+1' ),
+	// Background-color lightened
+	array( '.has-background-light-background-color[class],
+			.has-background-light-background-color[class].has-background-dim', 'background-color', '+1' ),
+
+), __( 'Background Color' ) );
+
+// Link Color
+// $config-global--color-primary-default
+add_color_rule( 'link', '#0073AA', array(
+
+	// Background-color
+	array( '.a8c-posts-list-item__featured span,
+			.a8c-posts-list__view-all,
+			.button,
+			.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background),
+			.wp-block-file .wp-block-file__button,
+			.wp-block-file__button,
+			.wp-block-pullquote.is-style-solid-color,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept,
+			button,
+			button[data-load-more-btn],
+			input[type="submit"]', 'background-color' ),
+			
+	// Background-color darkened
+	array( '.a8c-posts-list__view-all:focus,
+			.a8c-posts-list__view-all:hover,
+			.button:focus,
+			.button:hover,
+			.has-focus.a8c-posts-list__view-all,
+			.has-focus.button,
+			.wp-block-button__link.has-focus,
+			.wp-block-file__button.has-focus,
+			.main-navigation #toggle:focus + #toggle-menu,
+			.wp-block-button__link:focus,
+			.wp-block-button__link:hover,
+			.wp-block-file__button:focus,
+			.wp-block-file__button:hover,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:focus,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.accept:hover,
+			body .widget_eu_cookie_law_widget #eu-cookie-law input.has-focus.accept,
+			button.has-focus,
+			button:focus,
+			button:hover,
+			input.has-focus[type="submit"],
+			input:focus[type="submit"],
+			input:hover[type="submit"]', 'background-color', '-1' ),
+
+	// Text-color
+	array( '.a8c-posts-list-item__featured span,
+			.main-navigation a,
+			.main-navigation a:link,
+			.main-navigation a:visited,
+			.site-title a:hover,
+			.social-navigation a:hover,
+			.sticky-post,
+			.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
+			.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):active,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a:active,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a:focus,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a:hover,
+			a,
+			.site-header .main-navigation > div > ul > li.current-menu-item li > a,
+			.site-header .main-navigation > div > ul > li.focus li > a,
+			.site-header .main-navigation > div > ul > li:hover li > a,
+			.main-navigation > div > ul > li > .sub-menu', 'color' ),
+			
+	// Text-color darkened
+	array( '.a8c-posts-list__item .a8c-posts-list-item__meta a:active,
+			.a8c-posts-list__item .a8c-posts-list-item__meta a:hover,
+			.comment-meta .comment-metadata a:active,
+			.comment-meta .comment-metadata a:hover,
+			.entry-footer a:active,
+			.entry-footer a:hover,
+			.entry-meta a:active,
+			.entry-meta a:hover,
+			.footer-navigation .footer-menu a:hover,
+			.main-navigation a:hover,
+			.site-info a:hover,
+			.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color).has-focus,
+			.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):focus,
+			.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):hover,
+			.wp-block-newspack-blocks-homepage-articles article .cat-links a:active,
+			.wp-block-newspack-blocks-homepage-articles article .cat-links a:hover,
+			.wp-block-newspack-blocks-homepage-articles article .entry-meta a:active,
+			.wp-block-newspack-blocks-homepage-articles article .entry-meta a:hover,
+			.wp-block-newspack-blocks-homepage-articles article .entry-title a:hover,
+			a:hover', 'color', '-1' ),
+
+	// Border color
+	array( '.main-navigation > div > ul > li > .sub-menu', 'border-color' ),
+	
+	// Border color left
+	array( '.wp-block-quote', 'border-left-color' ),
+
+	// Border color right
+	array( '.wp-block-quote[style*="text-align: right"],
+			.wp-block-quote[style*="text-align:right"]', 'border-right-color' ),
+
+	// Border color bottom
+	array( '.site-header .main-navigation > div > ul > li.current-menu-item > ul:before,
+			.site-header .main-navigation > div > ul > li.focus > ul:before,
+			.site-header .main-navigation > div > ul > li:hover > ul:before', 'border-bottom-color' ),
+
+	// Border color darkened
+	array( 'input[type="color"]:focus,
+			input[type="date"]:focus,
+			input[type="datetime"]:focus,
+			input[type="datetime-local"]:focus,
+			input[type="email"]:focus,
+			input[type="month"]:focus,
+			input[type="number"]:focus,
+			input[type="password"]:focus,
+			input[type="range"]:focus,
+			input[type="search"]:focus,
+			input[type="tel"]:focus,
+			input[type="text"]:focus,
+			input[type="time"]:focus,
+			input[type="url"]:focus,
+			input[type="week"]:focus,
+			textarea:focus', 'border-color', '-1' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Background-color
+	array( '.has-primary-background-color[class],
+			.has-primary-background-color[class].has-background-dim', 'background-color' ),
+
+	// Text-color
+	array( '.has-primary-color[class]', 'color' ),
+
+), __( 'Link Color' ) );
+
+// Text Color
+// $config-global--color-foreground-default
+add_color_rule( 'txt', '#1e1e1e', array(
+
+	// Text-color
+	array( '.comment-meta .comment-metadata,
+			.main-navigation,
+			.screen-reader-text:focus,
+			.wp-block-code,
+			.wp-block-code pre,
+			.wp-block-pullquote,
+			body,
+			.wp-block-table.is-style-stripes tbody tr:nth-child(odd),
+			table.is-style-stripes tbody tr:nth-child(odd),
+			body .widget_eu_cookie_law_widget #eu-cookie-law,
+			body .widget_eu_cookie_law_widget #eu-cookie-law.negative input.accept,
+			.site-header .main-navigation > div > ul > li > a:hover,
+			.site-header .main-navigation > div > ul > li:hover li:hover > a, 
+			.site-header .main-navigation > div > ul > li:hover li.focus > a, 
+			.site-header .main-navigation > div > ul > li:hover li.current-menu-item > a, 
+			.site-header .main-navigation > div > ul > li.focus li:hover > a, 
+			.site-header .main-navigation > div > ul > li.focus li.focus > a, 
+			.site-header .main-navigation > div > ul > li.focus li.current-menu-item > a, 
+			.site-header .main-navigation > div > ul > li.current-menu-item li:hover > a, 
+			.site-header .main-navigation > div > ul > li.current-menu-item li.focus > a, 
+			.site-header .main-navigation > div > ul > li.current-menu-item li.current-menu-item > a', 'color' ),
+
+	// Text-color darkened
+	array( '.has-foreground-dark-color,
+			.site-branding,
+			.site-description,
+			.site-title,
+			.social-navigation a', 'color', '-1' ),
+			
+	// Text-color lightened
+	array( '.a8c-posts-list__item .a8c-posts-list-item__meta,
+			.entry-footer,
+			.entry-meta,
+			.footer-navigation .footer-menu,
+			.has-foreground-light-color,
+			.site-info,
+			.wp-block-image figcaption,
+			.wp-block-latest-comments .wp-block-latest-comments__comment-date,
+			.wp-block-latest-posts .wp-block-latest-posts__post-date,
+			.wp-block-newspack-blocks-homepage-articles article .cat-links,
+			.wp-block-newspack-blocks-homepage-articles article .entry-meta,
+			.wp-block-pullquote .wp-block-pullquote__citation,
+			.wp-block-pullquote cite,
+			.wp-block-pullquote footer,
+			.wp-block-quote .wp-block-quote__citation,
+			.wp-block-quote cite,
+			.wp-block-quote footer,
+			.wp-block-quote.is-large .wp-block-quote__citation,
+			.wp-block-quote.is-large cite,
+			.wp-block-quote.is-large footer,
+			.wp-block-quote.is-style-large .wp-block-quote__citation,
+			.wp-block-quote.is-style-large cite,
+			.wp-block-quote.is-style-large footer,
+			.wp-block-video figcaption,
+			figcaption', 'color', '+2' ),
+
+	// Background-color
+	array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'background-color' ),
+	
+	// Text-color darkened
+	array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'border-color', '-1' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Foreground
+	array( '.has-background-background-color[class],
+			.has-background-background-color[class].has-background-dim,
+			.has-background-dark-background-color[class],
+			.has-background-dark-background-color[class].has-background-dim,
+			.has-background-light-background-color[class],
+			.has-background-light-background-color[class].has-background-dim,
+			.has-foreground-color[class]', 'color' ),
+
+	// Background
+	array( '.has-background-dim,
+			.has-foreground-background-color[class],
+			.has-foreground-background-color[class].has-background-dim', 'background-color' ),
+
+	// Text-color darkened
+	array( '.has-foreground-dark-color[class]', 'color', '-1' ),
+	// Background-color darkened
+	array( '.has-foreground-dark-background-color[class]', 'background-color', '-1' ),
+
+	// Text-color brightened
+	array( '.has-foreground-light-color[class]', 'color', '+2' ),
+	// Background-color brightened
+	array( '.has-foreground-light-background-color[class],
+			.has-foreground-light-background-color[class].has-background-dim', 'background-color', '+2' ),
+
+	/**
+	 * Gray (Same as text color)
+	 */
+	// Text-color
+	array( '.a8c-posts-list__item .a8c-posts-list-item__meta,
+			.entry-footer,
+			.entry-meta,
+			.footer-navigation .footer-menu,
+			.has-foreground-light-color[class],
+			.site-info,
+			.wp-block-image figcaption,
+			.wp-block-latest-comments .wp-block-latest-comments__comment-date,
+			.wp-block-latest-posts .wp-block-latest-posts__post-date,
+			.wp-block-newspack-blocks-homepage-articles article .cat-links,
+			.wp-block-newspack-blocks-homepage-articles article .entry-meta,
+			.wp-block-pullquote .wp-block-pullquote__citation,
+			.wp-block-pullquote cite,
+			.wp-block-pullquote footer,
+			.wp-block-quote .wp-block-quote__citation,
+			.wp-block-quote cite,
+			.wp-block-quote footer,
+			.wp-block-quote.is-large .wp-block-quote__citation,
+			.wp-block-quote.is-large cite,
+			.wp-block-quote.is-large footer,
+			.wp-block-quote.is-style-large .wp-block-quote__citation,
+			.wp-block-quote.is-style-large cite,
+			.wp-block-quote.is-style-large footer,
+			.wp-block-video figcaption,
+			figcaption,
+			.site-branding,
+			.site-description,
+			.site-title,
+			.social-navigation a', 'color' ),
+	// Border-color
+	array( 'body .widget_eu_cookie_law_widget #eu-cookie-law.negative', 'border-color' ),
+
+), __( 'Text Color' ) );
+
+// Accent Color
+// $config-global--color-secondary-default
+add_color_rule( 'fg1', '#0d1b24', array(
+
+	/**
+	 * Utility Classes
+	 */
+	// Text-color
+	array( '.has-secondary-color[class]', 'color' ),
+
+	// Background-color
+	array( '.has-secondary-background-color[class]', 'background-color' ),
+
+), __( 'Secondary Color' ) );
+
+/**
+ * Custom CSS
+ */
+function dalston_custom_colors_extra_css() { ?>
+
+	.wp-block-button.is-style-outline .wp-block-button__link.has-text-color {
+		color: currentColor;
+	}
+
+	@media screen and (min-width: 560px) {
+		.main-navigation > div > ul > li > .sub-menu {
+			border: 1px solid;
+		}
+		.site-header .main-navigation > div > ul > li.current-menu-item > ul::before,
+		.site-header .main-navigation > div > ul > li.focus > ul::before,
+		.site-header .main-navigation > div > ul > li:hover > ul::before {
+			border: 0;
+		}
+ 	}
+<?php }
+add_theme_support( 'custom_colors_extra_css', 'dalston_custom_colors_extra_css' ); 
+
+/**
+ * Featured Varia Palettes
+ */
+// Light
+add_color_palette( array(
+	'#FFFFFF',
+	'#1D1E1E',
+	'#C8133E',
+	'#4E2F4B',
+), 'Light' );
+// Medium
+add_color_palette( array(
+	'#EEF4F7',
+	'#242527',
+	'#35845D',
+	'#233252',
+), 'Medium' );
+// Dark
+add_color_palette( array(
+	'#1F2527',
+	'#FFFFFF',
+	'#9FD3E8',
+	'#FBE6AA',
+), 'Dark' );

+ 182 - 0
dalston/inc/wpcom-editor-colors.php

@@ -0,0 +1,182 @@
+<?php
+/*
+ * Custom Editor Colors
+ */
+
+// Background Color
+// $config-global--color-background-default
+add_editor_color_rule( 'bg', '#FFFFFF', array(
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper', 'background-color' ),
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .button,
+			#editor .editor-styles-wrapper .button.has-focus,
+			#editor .editor-styles-wrapper .button:focus,
+			#editor .editor-styles-wrapper .button:hover,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:focus,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button:hover,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .has-focus.button,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link.has-focus,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
+			#editor .editor-styles-wrapper .wp-block-media-text,
+			#editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'color' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-primary-background-color[class],
+			#editor .editor-styles-wrapper .has-secondary-background-color[class],
+			#editor .editor-styles-wrapper .has-foreground-background-color[class],
+			#editor .editor-styles-wrapper .has-foreground-dark-background-color[class],
+			#editor .editor-styles-wrapper .has-foreground-light-background-color[class],
+			#editor .editor-styles-wrapper .has-background-color[class]', 'color' ),
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-background-background-color[class]', 'background-color' ),
+	// Text-color darkened
+	array( '#editor .editor-styles-wrapper .has-background-dark-color[class]', 'color', '-1'  ),
+	// Background-color darkened
+	array( '#editor .editor-styles-wrapper .has-background-dark-background-color[class]', 'background-color', '-1' ),
+	// Text-color lightened
+	array( '#editor .editor-styles-wrapper .has-background-light-color[class]', 'color', '+1'  ),
+	// Background-color lightened
+	array( '#editor .editor-styles-wrapper .has-background-light-background-color[class]', 'background-color', '+1' ),
+
+	/**
+	 * Grays
+	 * Uses a slightly darker color
+	 */
+	// Color
+	array( '#editor .editor-styles-wrapper .wp-block-separator.is-style-dots', 'color', '-1' ),
+	// Border-color
+	array( '#editor .editor-styles-wrapper .wp-block-code', 'border-color', '-1' ),
+	// Border-top-color
+	array( '#editor .editor-styles-wrapper .wp-block-pullquote', 'border-top-color', '-1' ),
+	// Border-bottom-color
+	array( '#editor .editor-styles-wrapper .wp-block-pullquote,
+			#editor .editor-styles-wrapper .wp-block-separator', 'border-bottom-color', '-1' ),
+
+), __( 'Background Color' ) );
+
+// Link Color
+// $config-global--color-primary-default
+add_editor_color_rule( 'link', '#0073AA', array(
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .button,
+			#editor .editor-styles-wrapper .wp-block-a8c-blog-posts + .button,
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background-color),
+			#editor .editor-styles-wrapper .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background),
+			#editor .editor-styles-wrapper .wp-block-pullquote.is-style-solid-color', 'background-color' ),
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .wp-block-a8c-blog-posts .entry-title a,
+			#editor .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
+			#editor .editor-styles-wrapper a', 'color' ),
+
+	// Border color left
+	array( '#editor .editor-styles-wrapper .wp-block-quote', 'border-left-color' ),
+
+	// Border color right
+	array( '#editor .editor-styles-wrapper .wp-block-quote[style*="text-align: right"],
+			#editor .editor-styles-wrapper .wp-block-quote[style*="text-align:right"]', 'border-right-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-primary-background-color[class]', 'background-color' ),
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-primary-color[class]', 'color' ),
+
+), __( 'Link Color' ) );
+
+// Text Color
+// $config-global--color-foreground-default
+add_editor_color_rule( 'txt', '#1e1e1e', array(
+
+	// Text-color
+	array( '#editor .editor-styles-wrapper .editor-post-title__block .editor-post-title__input,
+			#editor .editor-styles-wrapper .wp-block-pullquote,
+			#editor .editor-styles-wrapper', 'color' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-background-background-color[class],
+			#editor .editor-styles-wrapper .has-background-dark-background-color[class],
+			#editor .editor-styles-wrapper .has-background-light-background-color[class],
+			#editor .editor-styles-wrapper .has-foreground-color[class]', 'color' ),
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-foreground-background-color[class]', 'background-color' ),
+	// Text-color darkened
+	array( '#editor .editor-styles-wrapper .has-foreground-dark-color[class]', 'color', '-1' ),
+	// Background-color darkened
+	array( '#editor .editor-styles-wrapper .has-foreground-dark-background-color[class]', 'background-color', '-1' ),
+	// Text-color brightened
+	array( '#editor .editor-styles-wrapper .has-foreground-light-color[class]', 'color', '+2' ),
+	// Background-color brightened
+	array( '#editor .editor-styles-wrapper .has-foreground-light-background-color[class]', 'background-color', '+2' ),
+
+	/**
+	 * Grays
+	 * Same as text color
+	 */
+	// Text-color
+	array( '#editor .editor-styles-wrapper .a8c-posts-list__item .a8c-posts-list-item__meta,
+			#editor .editor-styles-wrapper .wp-block-image figcaption,
+			#editor .editor-styles-wrapper .wp-block-latest-comments .wp-block-latest-comments__comment-date,
+			#editor .editor-styles-wrapper .wp-block-latest-posts .wp-block-latest-posts__post-date,
+			#editor .editor-styles-wrapper .wp-block-newspack-blocks-homepage-articles article .cat-links,
+			#editor .editor-styles-wrapper .wp-block-newspack-blocks-homepage-articles article .entry-meta,
+			#editor .editor-styles-wrapper .wp-block-pullquote .wp-block-pullquote__citation,
+			#editor .editor-styles-wrapper .wp-block-pullquote cite,
+			#editor .editor-styles-wrapper .wp-block-pullquote footer,
+			#editor .editor-styles-wrapper .wp-block-quote .wp-block-quote__citation,
+			#editor .editor-styles-wrapper .wp-block-quote cite,
+			#editor .editor-styles-wrapper .wp-block-quote footer,
+			#editor .editor-styles-wrapper .wp-block-quote.is-large .wp-block-quote__citation,
+			#editor .editor-styles-wrapper .wp-block-quote.is-large cite,
+			#editor .editor-styles-wrapper .wp-block-quote.is-large footer,
+			#editor .editor-styles-wrapper .wp-block-quote.is-style-large .wp-block-quote__citation,
+			#editor .editor-styles-wrapper .wp-block-quote.is-style-large cite,
+			#editor .editor-styles-wrapper .wp-block-quote.is-style-large footer,
+			#editor .editor-styles-wrapper .wp-block-video figcaption,
+			#editor .editor-styles-wrapper figcaption', 'color' ),
+
+), __( 'Text Color' ) );
+
+// Accent Color
+// $config-global--color-secondary-default
+add_editor_color_rule( 'fg1', '#0d1b24', array(
+
+	// Background-color
+	array( '#editor .editor-styles-wrapper .wp-block-media-text', 'background-color' ),
+
+	/**
+	 * Utility Classes
+	 */
+	// Text-color
+	array( '#editor .editor-styles-wrapper .has-secondary-color[class]', 'color' ),
+	// Background-color
+	array( '#editor .editor-styles-wrapper .has-secondary-background-color[class]', 'background-color' ),
+
+), __( 'Secondary Color' ) );
+
+/**
+ * Custom CSS
+ */
+function dalston_editor_custom_colors_extra_css() { ?>
+	#editor .editor-styles-wrapper .has-background:not(.has-background-background-color) a:not(.wp-block-button__link),
+	#editor .editor-styles-wrapper p.has-text-color a {
+		color: currentColor;
+	}
+<?php }
+add_theme_support( 'custom_colors_extra_css', 'dalston_editor_custom_colors_extra_css' ); 
+

+ 21 - 0
dalston/inc/wpcom.php

@@ -0,0 +1,21 @@
+<?
+/**
+ * Adds support for wp.com-specific theme functions.
+ *
+ * @global array $themecolors
+ */
+function dalston_wpcom_setup() {
+	global $themecolors;
+
+	// Set theme colors for third party services.
+	if ( ! isset( $themecolors ) ) {
+		$themecolors = array(
+			'bg'     => 'FFFFFF', // $config-global--color-background-default
+			'border' => 'CCCCCC', // $config-global--color-border-default
+			'text'   => '1e1e1e', // $config-global--color-foreground-default
+			'link'   => '0073AA', // $config-global--color-primary-default
+			'url'    => '0073AA', // $config-global--color-primary-default
+		);
+	}
+}
+add_action( 'after_setup_theme', 'dalston_wpcom_setup' );

+ 1 - 1
dalston/sass/_extra-child-theme.scss

@@ -263,7 +263,7 @@ a {
 	}
 }
 
-.entry-content [class*="__inner-container"] a {
+.entry-content [class*="__inner-container"] a:not(.wp-block-button__link) {
 	text-decoration: underline;
 
 	&:hover {

+ 2 - 2
dalston/style-rtl.css

@@ -4253,11 +4253,11 @@ a {
 	border-color: #FFFFFF;
 }
 
-.entry-content [class*="__inner-container"] a {
+.entry-content [class*="__inner-container"] a:not(.wp-block-button__link) {
 	text-decoration: underline;
 }
 
-.entry-content [class*="__inner-container"] a:hover {
+.entry-content [class*="__inner-container"] a:not(.wp-block-button__link):hover {
 	text-decoration: none;
 }
 

+ 2 - 2
dalston/style.css

@@ -4282,11 +4282,11 @@ a {
 	border-color: #FFFFFF;
 }
 
-.entry-content [class*="__inner-container"] a {
+.entry-content [class*="__inner-container"] a:not(.wp-block-button__link) {
 	text-decoration: underline;
 }
 
-.entry-content [class*="__inner-container"] a:hover {
+.entry-content [class*="__inner-container"] a:not(.wp-block-button__link):hover {
 	text-decoration: none;
 }
 

+ 1 - 0
hever/functions.php

@@ -141,6 +141,7 @@ function hever_fonts_url() {
 		$query_args = array(
 			'family' => urlencode( implode( '|', $font_families ) ),
 			'subset' => urlencode( 'latin,latin-ext' ),
+			'display' => 'swap'
 		);
 
 		$fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );

+ 1 - 1
hever/sass/style-child-theme.scss

@@ -5,7 +5,7 @@ Author: Automattic
 Author URI: https://automattic.com/
 Description: A fully responsive theme, ideal for creating a strong — yet beautiful — online presence for your business.
 Requires at least: WordPress 4.9.6
-Version: 1.4.1
+Version: 1.4.2
 License: GNU General Public License v2 or later
 License URI: LICENSE
 Template: varia

+ 1 - 1
hever/style-rtl.css

@@ -6,7 +6,7 @@ Author: Automattic
 Author URI: https://automattic.com/
 Description: A fully responsive theme, ideal for creating a strong — yet beautiful — online presence for your business.
 Requires at least: WordPress 4.9.6
-Version: 1.4.1
+Version: 1.4.2
 License: GNU General Public License v2 or later
 License URI: LICENSE
 Template: varia

+ 1 - 1
hever/style.css

@@ -6,7 +6,7 @@ Author: Automattic
 Author URI: https://automattic.com/
 Description: A fully responsive theme, ideal for creating a strong — yet beautiful — online presence for your business.
 Requires at least: WordPress 4.9.6
-Version: 1.4.1
+Version: 1.4.2
 License: GNU General Public License v2 or later
 License URI: LICENSE
 Template: varia

二进制
ibis/Screenshot.png


+ 11 - 0
ibis/block-template-parts/footer.html

@@ -0,0 +1,11 @@
+<!-- wp:spacer {"height":30} -->
+<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>
+<!-- /wp:spacer -->
+
+<!-- wp:paragraph {"align":"center","fontSize":"small"} -->
+<p class="has-text-align-center has-small-font-size">Proudly powered by <a href="https://wordpress.org">WordPress</a></p>
+<!-- /wp:paragraph -->
+
+<!-- wp:spacer {"height":30} -->
+<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>
+<!-- /wp:spacer -->

+ 17 - 0
ibis/block-template-parts/header.html

@@ -0,0 +1,17 @@
+<!-- wp:group {"align":"full","backgroundColor":"background"} -->
+<div class="wp-block-group alignfull has-background-background-color has-background"><div class="wp-block-group__inner-container"><!-- wp:spacer {"height":20} -->
+<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>
+<!-- /wp:spacer -->
+
+<!-- wp:columns {"align":"wide"} -->
+<div class="wp-block-columns alignwide"><!-- wp:column {"width":33.33} -->
+<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:site-title {"style":{"typography":{"fontSize":32}}} /--></div>
+<!-- /wp:column -->
+
+<!-- wp:column {"width":66.66} -->
+<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:navigation {"orientation":"horizontal","itemsJustification":"right"} -->
+<!-- wp:navigation-link {"label":"Home","url":"http://home"} /-->
+<!-- /wp:navigation --></div>
+<!-- /wp:column --></div>
+<!-- /wp:columns --></div></div>
+<!-- /wp:group -->

+ 15 - 0
ibis/block-templates/index.html

@@ -0,0 +1,15 @@
+<!-- wp:group {"align":"full","tagName":"header"} -->
+<div class="wp-block-group alignfull"><div class="wp-block-group__inner-container"><!-- wp:template-part {"slug":"header","theme":"ibis","align":"full"} /--></div></div>
+<!-- /wp:group -->
+
+<!-- wp:group {"align":"full","className":"site-content","tagName":"main"} -->
+<div class="wp-block-group alignfull site-content"><div class="wp-block-group__inner-container"><!-- wp:query-loop -->
+<!-- wp:post-title /-->
+
+<!-- wp:post-content /-->
+<!-- /wp:query-loop --></div></div>
+<!-- /wp:group -->
+
+<!-- wp:group {"align":"full","tagName":"footer"} -->
+<div class="wp-block-group alignfull"><div class="wp-block-group__inner-container"><!-- wp:template-part {"slug":"footer","theme":"ibis","align":"full"} /--></div></div>
+<!-- /wp:group -->

+ 13 - 0
ibis/block-templates/singular.html

@@ -0,0 +1,13 @@
+<!-- wp:group {"align":"full","tagName":"header"} -->
+<div class="wp-block-group alignfull"><div class="wp-block-group__inner-container"><!-- wp:template-part {"slug":"header","theme":"ibis","align":"full"} /--></div></div>
+<!-- /wp:group -->
+
+<!-- wp:group {"align":"full","className":"site-content","tagName":"main"} -->
+<div class="wp-block-group alignfull site-content"><div class="wp-block-group__inner-container">
+<!-- wp:post-title /-->
+<!-- wp:post-content {"align":"full"} /--></div></div>
+<!-- /wp:group -->
+
+<!-- wp:group {"align":"full","tagName":"footer"} -->
+<div class="wp-block-group alignfull"><div class="wp-block-group__inner-container"><!-- wp:template-part {"slug":"footer","theme":"ibis","align":"full"} /--></div></div>
+<!-- /wp:group -->

+ 58 - 0
ibis/experimental-theme.json

@@ -0,0 +1,58 @@
+{
+	"global": {
+		"presets": {
+			"font-size": [
+				{
+					"slug": "tiny",
+					"value": "14px"
+				},
+				{
+					"slug": "small",
+					"value": "16px"
+				},
+				{
+					"slug": "medium",
+					"value": "18px"
+				},
+				{
+					"slug": "large",
+					"value": "24px"
+				},
+				{
+					"slug": "extra-large",
+					"value": "28px"
+				},
+				{
+					"slug": "huge",
+					"value": "32px"
+				},
+				{
+					"slug": "gigantic",
+					"value": "48px"
+				}
+			],
+			"color": [
+				{
+					"slug": "background",
+					"value": "#FFFFFF"
+				},
+				{
+					"slug": "foreground",
+					"value": "#303C4D"
+				},
+				{
+					"slug": "primary",
+					"value": "#E1534B"
+				},
+				{
+					"slug": "secondary",
+					"value": "#323E4E"
+				},
+				{
+					"slug": "tertiary",
+					"value": "#BED4DF"
+				}
+			]
+		}
+	}
+}

+ 71 - 0
ibis/functions.php

@@ -0,0 +1,71 @@
+<?php
+/**
+ * Ibis functions and definitions
+ *
+ * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
+ *
+ * @package WordPress
+ * @subpackage seedlet_blocks
+ * @since 1.0.0
+ */
+
+if ( ! function_exists( 'ibis_setup' ) ) :
+	/**
+	 * Sets up theme defaults and registers support for various WordPress features.
+	 *
+	 * Note that this function is hooked into the after_setup_theme hook, which
+	 * runs before the init hook. The init hook is too late for some features, such
+	 * as indicating support for post thumbnails.
+	 */
+	function ibis_setup() {
+		// Add support for editor styles.
+		add_theme_support( 'editor-styles' );
+
+		// Enqueue editor styles.
+		add_editor_style( get_stylesheet_directory_uri() . '/style-editor.css' );
+	}
+endif;
+add_action( 'after_setup_theme', 'ibis_setup', 999 );
+
+/**
+ * Add Google webfonts
+ *
+ * http://themeshaper.com/2014/08/13/how-to-add-google-fonts-to-wordpress-themes/
+ */
+function ibis_fonts_url() {
+
+	$fonts_url = '';
+
+	/* Translators: If there are characters in your language that are not
+	* supported by Lora, translate this to 'off'. Do not translate
+	* into your own language.
+	*/
+	$lora = esc_html_x( 'on', 'Lora font: on or off', 'ibis' );
+
+	if ( 'off' !== $lora ) {
+		$font_families = array();
+
+		$font_families[] = 'Lora:400,400i,600,600i,700,700i';
+
+		$query_args = array(
+			'family' => urlencode( implode( '|', $font_families ) ),
+			'subset' => urlencode( 'latin,latin-ext' ),
+		);
+
+		$fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
+	}
+
+	return esc_url_raw( $fonts_url );
+}
+
+/**
+ * Enqueue scripts and styles.
+ */
+function ibis_enqueue() {
+	wp_enqueue_style( 'ibis-styles', get_stylesheet_uri() );
+
+	// enqueue Google fonts
+	wp_enqueue_style( 'mayland-fonts', ibis_fonts_url(), array(), null );
+
+}
+add_action( 'wp_enqueue_scripts', 'ibis_enqueue' );

+ 33 - 0
ibis/readme.txt

@@ -0,0 +1,33 @@
+=== Ibis ===
+Contributors: Automattic
+Requires at least: 5.0
+Tested up to: 4.9.6
+Requires PHP: 7.3
+License: GPLv2 or later
+License URI: http://www.gnu.org/licenses/gpl-2.0.html
+
+A long-legged theme that inhabits wetlands, forests and plains.
+
+== Description ==
+
+Ibis is a long-legged theme that inhabits wetlands, forests and plains.
+
+== Changelog ==
+
+= 1.0 =
+* Initial release 
+
+== Copyright ==
+
+Ibis WordPress Theme, (C) 2020 Automattic, Inc.
+Ibis is distributed under the terms of the GNU GPL.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.

+ 48 - 0
ibis/style-editor.css

@@ -0,0 +1,48 @@
+/* Override Seedlet variables with values from experimental-theme.json. */
+body {
+	/* Font Family */
+	--global--font-primary: var(--font-headings, Lora, serif);
+	--global--font-secondary: var(--font-base, Lora, sans-serif);
+	--global--font-code: monospace, monospace;
+	--global--font-ui: var(--font-base, var(--global--font-secondary));
+
+	/* Font Size */
+	--global--font-size-xs: var(--wp--preset--font-size--tiny);
+	--global--font-size-sm: var(--wp--preset--font-size--small);
+	--global--font-size-md: var(--wp--preset--font-size--medium);
+	--global--font-size-lg: var(--wp--preset--font-size--large);
+	--global--font-size-xl: var(--wp--preset--font-size--extra-large);
+	--global--font-size-xxl: var(--wp--preset--font-size--huge);
+	--global--font-size-xxxl: var(--wp--preset--font-size--gigantic);
+	--heading--font-weight: 600;
+	--heading--font-weight-strong: 700;	
+
+	/* Colors */
+	--global--color-background: var(--wp--preset--color--background);
+	--global--color-foreground: var(--wp--preset--color--foreground);
+	--global--color-primary: var(--wp--preset--color--primary);
+	--global--color-secondary: var(--wp--preset--color--secondary);
+	--global--color-tertiary: var(--wp--preset--color--tertiary);
+
+	/* Colors */
+	--button--padding-vertical: calc(.66 * var(--global--spacing-horizontal) - var(--button--border-width));
+	--button--padding-horizontal: var(--global--spacing-horizontal);
+}
+
+/**
+ * Override Seedlet Media Query Variables
+ */
+
+@media only screen and (min-width: 1024px) {
+	body {
+		--responsive--aligndefault-width: calc(750px - var(--responsive--spacing-horizontal));
+		--responsive--alignwide-width: calc(990px - var(--responsive--spacing-horizontal));
+		--responsive--alignright-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
+		--responsive--alignleft-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
+	}
+}
+
+.site-content .wp-block[data-align="full"] > [data-block], .site-content .wp-block.alignfull > [data-block] {
+	margin-top: 0;
+	margin-bottom: 0;
+}

+ 116 - 0
ibis/style.css

@@ -0,0 +1,116 @@
+/*
+Theme Name: Ibis
+Theme URI: https://github.com/Automattic/themes/
+Author: Automattic
+Author URI: https://automattic.com/
+Description: A long-legged theme that inhabits wetlands, forests and plains.
+Requires at least: 4.9.6
+Version: 1.0
+License: GNU General Public License v2 or later
+License URI: LICENSE
+Template: seedlet
+Text Domain: ibis
+Tags:
+
+Ibis WordPress Theme, (C) 2020 Automattic, Inc.
+Ibis is distributed under the terms of the GNU GPL.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+*/
+
+/* Override Seedlet variables.
+ * When possible, override with values from experimental-theme.json.
+ * Doubling up on the :root selector is weird, but it just ensures these have higher specificity than everything else)
+ * and that just makes doubling up on the :root selector really cool.
+ */
+:root:root {
+	/* Font Family */
+	--global--font-primary: var(--font-headings, Lora, serif);
+	--global--font-secondary: var(--font-base, Lora, sans-serif);
+	--global--font-code: monospace, monospace;
+	--global--font-ui: var(--font-base, var(--global--font-secondary));
+
+	/* Font Size */
+	--global--font-size-xs: var(--wp--preset--font-size--tiny);
+	--global--font-size-sm: var(--wp--preset--font-size--small);
+	--global--font-size-md: var(--wp--preset--font-size--medium);
+	--global--font-size-lg: var(--wp--preset--font-size--large);
+	--global--font-size-xl: var(--wp--preset--font-size--extra-large);
+	--global--font-size-xxl: var(--wp--preset--font-size--huge);
+	--global--font-size-xxxl: var(--wp--preset--font-size--gigantic);
+	--heading--font-weight: 600;
+	--heading--font-weight-strong: 700;	
+
+	/* Colors */
+	--global--color-background: var(--wp--preset--color--background);
+	--global--color-foreground: var(--wp--preset--color--foreground);
+	--global--color-primary: var(--wp--preset--color--primary);
+	--global--color-secondary: var(--wp--preset--color--secondary);
+	--global--color-tertiary: var(--wp--preset--color--tertiary);
+
+	/* Colors */
+	--button--padding-vertical: calc(.66 * var(--global--spacing-horizontal) - var(--button--border-width));
+	--button--padding-horizontal: var(--global--spacing-horizontal);
+}
+
+/**
+ * Override Seedlet Root Media Query Variables
+ * Doubling up on the :root selector is weird, but it just ensures these have higher specificity than everything else)
+ * and that just makes doubling up on the :root selector really cool.
+ */
+@media only screen and (min-width: 482px) {
+	:root:root {
+		--responsive--aligndefault-width: calc(482px - var(--responsive--spacing-horizontal));
+		--responsive--alignwide-width: calc(482px - var(--responsive--spacing-horizontal));
+		--responsive--alignright-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
+		--responsive--alignleft-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
+	}
+}
+@media only screen and (min-width: 592px) {
+	:root:root {
+		--responsive--aligndefault-width: calc(482px - var(--responsive--spacing-horizontal));
+		--responsive--alignwide-width: calc(592px - var(--responsive--spacing-horizontal));
+		--responsive--alignright-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
+		--responsive--alignleft-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
+	}
+}
+@media only screen and (min-width: 652px) {
+	:root:root {
+		--responsive--aligndefault-width: calc(592px - var(--responsive--spacing-horizontal));
+		--responsive--alignwide-width: calc(652px - var(--responsive--spacing-horizontal));
+		--responsive--alignright-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
+		--responsive--alignleft-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
+	}
+}
+@media only screen and (min-width: 822px) {
+	:root:root {
+		--responsive--aligndefault-width: calc(652px - var(--responsive--spacing-horizontal));
+		--responsive--alignwide-width: calc(822px - var(--responsive--spacing-horizontal));
+		--responsive--alignright-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
+		--responsive--alignleft-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
+	}
+}
+@media only screen and (min-width: 1024px) {
+	:root:root {
+		--responsive--aligndefault-width: calc(750px - var(--responsive--spacing-horizontal));
+		--responsive--alignwide-width: calc(990px - var(--responsive--spacing-horizontal));
+		--responsive--alignright-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
+		--responsive--alignleft-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
+	}
+}
+
+/* Make sure full-width items in entry content show up as full-width. */
+.wp-block-group.site-content .wp-block-group__inner-container .entry-content {
+	max-width: calc(100% + (2 * var(--global--spacing-horizontal)));
+	width: calc(100% + (2 * var(--global--spacing-horizontal)));
+	margin-left: calc(-1 * var(--global--spacing-horizontal));
+	margin-right: auto;
+}

+ 15 - 0
illustratr/blocks.css

@@ -226,6 +226,21 @@ p.has-drop-cap:not(:focus)::first-letter {
 	display: flex;
 }
 
+/* Blog Posts */
+
+.wp-block-newspack-blocks-homepage-articles.is-grid .entry-meta {
+	width: initial;
+}
+
+.wp-block-newspack-blocks-homepage-articles.is-grid .entry-title,
+.wp-block-newspack-blocks-homepage-articles.is-grid .cat-links {
+	text-align: left;
+}
+
+.wp-block-newspack-blocks-homepage-articles.is-grid .entry-meta:before {
+	display: none;
+}
+
 /*--------------------------------------------------------------
 3.0 Blocks - Formatting Blocks
 --------------------------------------------------------------*/

+ 6 - 0
illustratr/editor-blocks.css

@@ -558,6 +558,12 @@
 	text-transform: uppercase;
 }
 
+/* Blog Posts */
+
+.wp-block-a8c-blog-posts .entry-title {
+	text-trasform: uppercase;
+}
+
 /*--------------------------------------------------------------
 4.0 Blocks - Formatting
 --------------------------------------------------------------*/

+ 3 - 5
seedlet-blocks/block-template-parts/header.html

@@ -4,11 +4,9 @@
 
 <!-- wp:site-logo {"align":"center","width":128} /-->
 
-<!-- wp:site-title {"align":"center"} /-->
+<!-- wp:site-title {"textAlign":"center"} /-->
 
-<!-- wp:paragraph {"align":"center","fontSize":"small"} -->
-<p class="has-text-align-center has-small-font-size">is a curious botanist</p>
-<!-- /wp:paragraph -->
+<!-- wp:site-tagline {"textAlign":"center","fontSize":"small"} /-->
 
 <!-- wp:navigation {"itemsJustification":"center"} -->
 <!-- wp:navigation-link {"label":"Home","url":"#"} /-->
@@ -16,4 +14,4 @@
 
 <!-- wp:spacer {"height":60} -->
 <div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
-<!-- /wp:spacer -->
+<!-- /wp:spacer -->

+ 2 - 2
seedlet-blocks/functions.php

@@ -25,7 +25,7 @@ if ( ! function_exists( 'seedlet_blocks_setup' ) ) :
 		add_editor_style( 'style-editor.css' );
 	}
 endif;
-add_action( 'after_setup_theme', 'seedlet_blocks_setup' );
+add_action( 'after_setup_theme', 'seedlet_blocks_setup', 11 );
 
 /**
  * Enqueue scripts and styles.
@@ -33,4 +33,4 @@ add_action( 'after_setup_theme', 'seedlet_blocks_setup' );
 function seedlet_blocks_enqueue() {
 	wp_enqueue_style( 'seedlet-blocks-styles', get_stylesheet_uri() );
 }
-add_action( 'wp_enqueue_scripts', 'seedlet_blocks_enqueue' );
+add_action( 'wp_enqueue_scripts', 'seedlet_blocks_enqueue', 11 );

+ 1 - 2
seedlet/404.php

@@ -4,8 +4,7 @@
  *
  * @link https://codex.wordpress.org/Creating_an_Error_404_Page
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 2
seedlet/archive.php

@@ -4,8 +4,7 @@
  *
  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 37 - 9
seedlet/assets/css/ie.css

@@ -1,6 +1,6 @@
 /*
 Theme Name: Seedlet
-Theme URI: https://github.com/Automattic/themes/seedlet
+Theme URI: https://github.com/Automattic/themes/tree/master/seedlet
 Author: Automattic
 Author URI: https://automattic.com/
 Description: A simple, text-driven, single-column theme.
@@ -1520,10 +1520,6 @@ a:focus {
 }
 
 a:active {
-	color: undefined;
-}
-
-p.has-background.has-link-color:not(.has-background-background-color) a {
 	color: #000000;
 }
 
@@ -1531,6 +1527,14 @@ p.has-background.has-link-color:not(.has-background-background-color) a {
 	border-bottom: 1px solid #000000;
 }
 
+.has-background:not(.has-background-background-color) .has-link-color a {
+	color: #000000;
+}
+
+.has-background:not(.has-background-background-color).has-link-color a {
+	color: #000000;
+}
+
 *:focus {
 	outline-width: 1px;
 	outline-style: dotted;
@@ -2196,6 +2200,30 @@ object {
 	color: currentColor;
 }
 
+.wp-block-cover .wp-block-cover__inner-container .has-link-color a {
+	color: #000000;
+}
+
+.wp-block-cover .wp-block-cover-image-text .has-link-color a {
+	color: #000000;
+}
+
+.wp-block-cover .wp-block-cover-text .has-link-color a {
+	color: #000000;
+}
+
+.wp-block-cover-image .wp-block-cover__inner-container .has-link-color a {
+	color: #000000;
+}
+
+.wp-block-cover-image .wp-block-cover-image-text .has-link-color a {
+	color: #000000;
+}
+
+.wp-block-cover-image .wp-block-cover-text .has-link-color a {
+	color: #000000;
+}
+
 .wp-block-cover:not([class*='background-color']) .wp-block-cover__inner-container {
 	color: #FAFBF6;
 }
@@ -2909,10 +2937,6 @@ dd {
 	margin-bottom: 0;
 }
 
-.wp-block-media-text[class*="background-color"]:not(.has-background-background-color) .wp-block-media-text__content a, .wp-block-media-text[style*="background-color"] .wp-block-media-text__content a {
-	color: currentColor;
-}
-
 @media only screen and (min-width: 482px) {
 	.wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__content {
 		padding-top: 30px;
@@ -2997,6 +3021,10 @@ p.has-background {
 	padding: 20px;
 }
 
+p.has-text-color a {
+	color: #000000;
+}
+
 .a8c-posts-list__listing {
 	list-style: none;
 	margin: 0;

+ 19 - 15
seedlet/assets/css/style-editor.css

@@ -303,26 +303,27 @@ body {
 	font-size: var(--global--font-size-root);
 }
 
-a {
+.wp-block a {
 	border-bottom: 1px solid var(--global--color-secondary);
 	color: var(--wp--style--color--link, var(--global--color-primary));
 	text-decoration: none;
 }
 
-a:hover, a:focus {
+.wp-block a:hover, .wp-block a:focus {
 	color: var(--global--color-primary-hover);
 }
 
-a:active {
+.wp-block a:active {
 	color: var(--wp--style--color--link, var(--global--color-primary));
 }
 
-p.has-background.has-link-color:not(.has-background-background-color) a {
-	color: var(--wp--style--color--link, var(--global--color-primary));
+.has-link-color .wp-block a {
+	border-bottom: 1px solid var(--wp--style--color--link);
 }
 
-.has-link-color a {
-	border-bottom: 1px solid var(--wp--style--color--link);
+.has-background:not(.has-background-background-color) .has-link-color a,
+.has-background:not(.has-background-background-color).has-link-color a {
+	color: var(--wp--style--color--link, var(--global--color-primary));
 }
 
 button,
@@ -484,6 +485,17 @@ div[data-type="core/button"] {
 	color: currentColor;
 }
 
+.wp-block-cover .wp-block-cover__inner-container .has-link-color a,
+.wp-block-cover .wp-block-cover-image-text .has-link-color a,
+.wp-block-cover .wp-block-cover-text .has-link-color a,
+.wp-block-cover .block-editor-block-list__block .has-link-color a,
+.wp-block-cover-image .wp-block-cover__inner-container .has-link-color a,
+.wp-block-cover-image .wp-block-cover-image-text .has-link-color a,
+.wp-block-cover-image .wp-block-cover-text .has-link-color a,
+.wp-block-cover-image .block-editor-block-list__block .has-link-color a {
+	color: var(--wp--style--color--link, var(--global--color-primary));
+}
+
 .wp-block-cover:not([class*='background-color']) .wp-block-cover__inner-container,
 .wp-block-cover:not([class*='background-color']) .wp-block-cover-image-text,
 .wp-block-cover:not([class*='background-color']) .wp-block-cover-text,
@@ -774,10 +786,6 @@ dt {
 	padding-left: var(--global--spacing-horizontal);
 }
 
-.wp-block-media-text[style*="background-color"]:not(.has-background-background-color) a {
-	color: currentColor;
-}
-
 .wp-block-navigation .wp-block-navigation__container {
 	background: var(--global--color-background);
 	padding: 0;
@@ -813,10 +821,6 @@ p.has-background {
 	padding: var(--global--spacing-unit);
 }
 
-p.has-background:not(.has-background-background-color) a {
-	color: currentColor;
-}
-
 .a8c-posts-list {
 	padding-left: 0;
 }

+ 4 - 4
seedlet/assets/js/customizer-validate-wcag-color-contrast.js

@@ -1,8 +1,8 @@
 /**
  * @author Per Soderlind
  * @link https://github.com/soderlind/2016-customizer-demo
- * global wp, _validateWCAGColorContrastExports
- * global validateContrastText
+ * global wp, seedletValidateWCAGColorContrastExports
+ * global seedletValidateContrastText
  * exported validateWCAGColorContrast
 **/
 ( function( $, api, exports ) {
@@ -49,7 +49,7 @@
 			});
 
 			if ( failsWCAG ){
-				var validationWarning = new api.Notification( code, { message: validateContrastText, type: 'warning' } );
+				var validationWarning = new api.Notification( code, { message: seedletValidateContrastText, type: 'warning' } );
 				setTimeout( function(){
 					self.custom_colors_setting.notifications.add( code, validationWarning );
 				}, 400);
@@ -210,4 +210,4 @@
 
 	return self;
 
-} )( jQuery, wp.customize, _validateWCAGColorContrastExports );
+} )( jQuery, wp.customize, seedletValidateWCAGColorContrastExports );

+ 10 - 7
seedlet/assets/sass/base/_editor.scss

@@ -17,7 +17,7 @@ body {
 }
 
 // Links styles
-a {
+.wp-block a {
 	border-bottom: 1px solid var(--global--color-secondary);
 	color: var( --wp--style--color--link, var(--global--color-primary) );
 	text-decoration: none;
@@ -31,18 +31,21 @@ a {
 		color: var( --wp--style--color--link, var(--global--color-primary) );
 	}
 
-	// Enforce the custom link color even if a custom background color has been set.
-	// The extra specificity here is required to override the background color styles.
-	p.has-background.has-link-color:not(.has-background-background-color) & {
-		color: var( --wp--style--color--link, var(--global--color-primary) );
-	}
-
 	// If a custom link color has been assigned,
 	// switch the color of the bottom border too. 
 	.has-link-color & {
 		border-bottom: 1px solid var(--wp--style--color--link);
 	}
 }
+// Enforce the custom link color even if a custom background color has been set.
+// The extra specificity here is required to override the background color styles.
+.has-background:not(.has-background-background-color) {
+	// Target both current level and nested block.
+	.has-link-color a,
+	&.has-link-color a {
+		color: var( --wp--style--color--link, var(--global--color-primary) );
+	}
+}
 
 button,
 a {

+ 9 - 6
seedlet/assets/sass/base/_reset.scss

@@ -90,12 +90,6 @@ a {
 	}
 
 	&:active {
-		color: var(--wp--style--color--link);
-	}
-
-	// Enforce the custom link color even if a custom background color has been set.
-	// The extra specificity here is required to override the background color styles.
-	p.has-background.has-link-color:not(.has-background-background-color) & {
 		color: var( --wp--style--color--link, var(--global--color-primary) );
 	}
 
@@ -105,6 +99,15 @@ a {
 		border-bottom: 1px solid var( --wp--style--color--link, var(--global--color-primary) );
 	}
 }
+// Enforce the custom link color even if a custom background color has been set.
+// The extra specificity here is required to override the background color styles.
+.has-background:not(.has-background-background-color) {
+	// Target both current level and nested block.
+	.has-link-color a,
+	&.has-link-color a {
+		color: var( --wp--style--color--link, var(--global--color-primary) );
+	}
+}
 
 // Focus styles
 *:focus {

+ 3 - 0
seedlet/assets/sass/blocks/cover/_editor.scss

@@ -15,6 +15,9 @@
 		a {
 			color: currentColor;
 		}
+		.has-link-color a {
+			color: var( --wp--style--color--link, var(--global--color-primary) );
+		}
 	}
 
 	// Default & custom background-color

+ 3 - 0
seedlet/assets/sass/blocks/cover/_style.scss

@@ -16,6 +16,9 @@
 		a {
 			color: currentColor;
 		}
+		.has-link-color a {
+			color: var( --wp--style--color--link, var(--global--color-primary) );
+		}
 	}
 
 	/* default & custom background-color */

+ 0 - 6
seedlet/assets/sass/blocks/media-text/_editor.scss

@@ -3,10 +3,4 @@
 		padding-right: var(--global--spacing-horizontal);
 		padding-left: var(--global--spacing-horizontal);
 	}
-
-	&[style*="background-color"]:not(.has-background-background-color) {
-		a {
-			color: currentColor;
-		}
-	}
 }

+ 0 - 9
seedlet/assets/sass/blocks/media-text/_style.scss

@@ -26,15 +26,6 @@
 		}
 	}
 
-	&[class*="background-color"]:not(.has-background-background-color),
-	&[style*="background-color"] {
-		.wp-block-media-text__content {
-			a {
-				color: currentColor;
-			}
-		}
-	}
-
 	/**
 	 * Block Options
 	 */

+ 0 - 4
seedlet/assets/sass/blocks/paragraph/_editor.scss

@@ -3,9 +3,5 @@ p {
 
 	&.has-background {
 		padding: var(--global--spacing-unit);
-
-		&:not(.has-background-background-color) a {
-			color: currentColor;
-		}
 	}
 }

+ 5 - 0
seedlet/assets/sass/blocks/paragraph/_style.scss

@@ -6,4 +6,9 @@ p {
 	&.has-background {
 		padding: var(--global--spacing-unit);
 	}
+
+	// Override `color: inherit` from Core styles.
+	&.has-text-color a {
+		color: var( --wp--style--color--link, var(--global--color-primary) );
+	}
 }

+ 1 - 1
seedlet/assets/sass/style.scss

@@ -1,6 +1,6 @@
 /*
 Theme Name: Seedlet
-Theme URI: https://github.com/Automattic/themes/seedlet
+Theme URI: https://github.com/Automattic/themes/tree/master/seedlet
 Author: Automattic
 Author URI: https://automattic.com/
 Description: A simple, text-driven, single-column theme.

+ 4 - 5
seedlet/classes/class-seedlet-custom-colors.php

@@ -7,8 +7,7 @@
  * Each variable that needs to be updated is defined in the $seedlet_custom_color_variables array below.
  * A customizer setting is created for each color, and custom CSS-variables are enqueued in the front and back end.
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 
@@ -278,7 +277,7 @@ class Seedlet_Custom_Colors {
 	 * @link https://github.com/soderlind/2016-customizer-demo
 	 */
 	function on_customize_controls_enqueue_scripts() {
-		$handle = 'wcag-validate-customizer-color-contrast';
+		$handle = 'seedlet-wcag-validate-customizer-color-contrast';
 		$src    = get_template_directory_uri() . '/assets/js/customizer-validate-wcag-color-contrast.js';
 		$deps 	= [ 'customize-controls' ];
 
@@ -293,10 +292,10 @@ class Seedlet_Custom_Colors {
 		];
 
 		wp_enqueue_script( $handle, $src, $deps );
-		wp_script_add_data( $handle, 'data', sprintf( 'var _validateWCAGColorContrastExports = %s;', wp_json_encode( $exports ) ) );
+		wp_script_add_data( $handle, 'data', sprintf( 'var seedletValidateWCAGColorContrastExports = %s;', wp_json_encode( $exports ) ) );
 
 		// Custom color contrast validation text
-		wp_localize_script( $handle, 'validateContrastText', esc_html__( 'This color combination may be hard for people to read. Try using a brighter background color and/or a darker foreground color.', 'seedlet' ));
+		wp_localize_script( $handle, 'seedletValidateContrastText', esc_html__( 'This color combination may be hard for people to read. Try using a brighter background color and/or a darker foreground color.', 'seedlet' ));
 	}
 
 	/**

+ 1 - 2
seedlet/classes/class-seedlet-svg-icons.php

@@ -2,8 +2,7 @@
 /**
  * SVG Icons class
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 2
seedlet/footer.php

@@ -6,8 +6,7 @@
  *
  * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 4 - 2
seedlet/functions.php

@@ -4,8 +4,7 @@
  *
  * @link https://developer.wordpress.org/themes/basics/theme-functions/
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 
@@ -260,6 +259,9 @@ if ( ! function_exists( 'seedlet_setup' ) ) :
 
 		// Add support for experimental link color control.
 		add_theme_support( 'experimental-link-color' );
+
+		// Add support for experimental cover block spacing.
+		add_theme_support( 'experimental-custom-spacing' );
     
 		// Add support for WordPress.com Global Styles.
 		add_theme_support(

+ 3 - 4
seedlet/header.php

@@ -6,8 +6,7 @@
  *
  * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 ?><!doctype html>
@@ -41,13 +40,13 @@
 					$location_name = 'primary';
 					$locations = get_nav_menu_locations();
 					$menu_id = $locations[ $location_name ];
-					$menu = wp_get_nav_menu_object( $menu_id );
+					$menu_obj = wp_get_nav_menu_object( $menu_id );
 
 					wp_nav_menu(
 						array(
 							'theme_location'  => 'primary',
 							'menu_class'      => 'menu-wrapper',
-							'container_class' => 'primary-menu-container menu-'. $menu->slug .'-container',
+							'container_class' => 'primary-menu-container menu-'. $menu_obj->slug .'-container',
 							'items_wrap'      => '<ul id="%1$s" class="%2$s" aria-label="' . esc_attr__( 'submenu', 'seedlet' ) . '">%3$s</ul>',
 						)
 					);

+ 1 - 2
seedlet/image.php

@@ -2,8 +2,7 @@
 /**
  * The template for displaying image attachments
  *
- * @package WordPress
- * @subpackage Varia
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 2
seedlet/inc/back-compat.php

@@ -6,8 +6,7 @@
  * since this theme is not meant to be backward compatible beyond that and
  * relies on many newer functions and markup changes introduced in 4.7.
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since seedlet 1.0.0
  */
 

+ 1 - 2
seedlet/inc/block-patterns.php

@@ -2,8 +2,7 @@
 /**
  * Seedlet Theme: Block Patterns
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 2
seedlet/inc/customizer.php

@@ -2,8 +2,7 @@
 /**
  * Seedlet Theme: Customizer
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 2
seedlet/inc/icon-functions.php

@@ -2,8 +2,7 @@
 /**
  * SVG icons related functions
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 2
seedlet/inc/template-functions.php

@@ -2,8 +2,7 @@
 /**
  * Functions which enhance the theme by hooking into WordPress
  *
- * @package WordPress
- * @subpackage Varia
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 2
seedlet/inc/template-tags.php

@@ -2,8 +2,7 @@
 /**
  * Custom template tags for this theme
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 1
seedlet/inc/woocommerce.php

@@ -87,7 +87,7 @@ function seedlet_category_image() {
 		$thumbnail_id = get_term_meta( $cat->term_id, 'thumbnail_id', true );
 		$image = wp_get_attachment_url( $thumbnail_id );
 		if ( $image ) {
-			echo '<img src="' . $image . '" alt="' . $cat->name . '" />';
+			echo '<img src="' . esc_url( $image ) . '" alt="' . esc_attr( $cat->name ) . '" />';
 		}
 	}
 }

+ 1 - 2
seedlet/index.php

@@ -9,8 +9,7 @@
  *
  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 2
seedlet/page.php

@@ -4,8 +4,7 @@
  *
  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

二进制
seedlet/screenshot.png


+ 1 - 2
seedlet/search.php

@@ -4,8 +4,7 @@
  *
  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 2
seedlet/single.php

@@ -4,8 +4,7 @@
  *
  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 18 - 8
seedlet/style-rtl.css

@@ -983,10 +983,6 @@ a:hover, a:focus {
 }
 
 a:active {
-	color: var(--wp--style--color--link);
-}
-
-p.has-background.has-link-color:not(.has-background-background-color) a {
 	color: var(--wp--style--color--link, var(--global--color-primary));
 }
 
@@ -994,6 +990,11 @@ p.has-background.has-link-color:not(.has-background-background-color) a {
 	border-bottom: 1px solid var(--wp--style--color--link, var(--global--color-primary));
 }
 
+.has-background:not(.has-background-background-color) .has-link-color a,
+.has-background:not(.has-background-background-color).has-link-color a {
+	color: var(--wp--style--color--link, var(--global--color-primary));
+}
+
 *:focus {
 	outline-width: 1px;
 	outline-style: dotted;
@@ -1391,6 +1392,15 @@ object {
 	color: currentColor;
 }
 
+.wp-block-cover .wp-block-cover__inner-container .has-link-color a,
+.wp-block-cover .wp-block-cover-image-text .has-link-color a,
+.wp-block-cover .wp-block-cover-text .has-link-color a,
+.wp-block-cover-image .wp-block-cover__inner-container .has-link-color a,
+.wp-block-cover-image .wp-block-cover-image-text .has-link-color a,
+.wp-block-cover-image .wp-block-cover-text .has-link-color a {
+	color: var(--wp--style--color--link, var(--global--color-primary));
+}
+
 .wp-block-cover:not([class*='background-color']) .wp-block-cover__inner-container,
 .wp-block-cover:not([class*='background-color']) .wp-block-cover-image-text,
 .wp-block-cover:not([class*='background-color']) .wp-block-cover-text,
@@ -1883,10 +1893,6 @@ dd {
 	margin-bottom: 0;
 }
 
-.wp-block-media-text[class*="background-color"]:not(.has-background-background-color) .wp-block-media-text__content a, .wp-block-media-text[style*="background-color"] .wp-block-media-text__content a {
-	color: currentColor;
-}
-
 @media only screen and (min-width: 482px) {
 	.wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__content {
 		padding-top: var(--global--spacing-vertical);
@@ -1967,6 +1973,10 @@ p.has-background {
 	padding: var(--global--spacing-unit);
 }
 
+p.has-text-color a {
+	color: var(--wp--style--color--link, var(--global--color-primary));
+}
+
 .a8c-posts-list__listing {
 	list-style: none;
 	margin: 0;

+ 19 - 9
seedlet/style.css

@@ -1,6 +1,6 @@
 /*
 Theme Name: Seedlet
-Theme URI: https://github.com/Automattic/themes/seedlet
+Theme URI: https://github.com/Automattic/themes/tree/master/seedlet
 Author: Automattic
 Author URI: https://automattic.com/
 Description: A simple, text-driven, single-column theme.
@@ -991,10 +991,6 @@ a:hover, a:focus {
 }
 
 a:active {
-	color: var(--wp--style--color--link);
-}
-
-p.has-background.has-link-color:not(.has-background-background-color) a {
 	color: var(--wp--style--color--link, var(--global--color-primary));
 }
 
@@ -1002,6 +998,11 @@ p.has-background.has-link-color:not(.has-background-background-color) a {
 	border-bottom: 1px solid var(--wp--style--color--link, var(--global--color-primary));
 }
 
+.has-background:not(.has-background-background-color) .has-link-color a,
+.has-background:not(.has-background-background-color).has-link-color a {
+	color: var(--wp--style--color--link, var(--global--color-primary));
+}
+
 *:focus {
 	outline-width: 1px;
 	outline-style: dotted;
@@ -1399,6 +1400,15 @@ object {
 	color: currentColor;
 }
 
+.wp-block-cover .wp-block-cover__inner-container .has-link-color a,
+.wp-block-cover .wp-block-cover-image-text .has-link-color a,
+.wp-block-cover .wp-block-cover-text .has-link-color a,
+.wp-block-cover-image .wp-block-cover__inner-container .has-link-color a,
+.wp-block-cover-image .wp-block-cover-image-text .has-link-color a,
+.wp-block-cover-image .wp-block-cover-text .has-link-color a {
+	color: var(--wp--style--color--link, var(--global--color-primary));
+}
+
 .wp-block-cover:not([class*='background-color']) .wp-block-cover__inner-container,
 .wp-block-cover:not([class*='background-color']) .wp-block-cover-image-text,
 .wp-block-cover:not([class*='background-color']) .wp-block-cover-text,
@@ -1891,10 +1901,6 @@ dd {
 	margin-bottom: 0;
 }
 
-.wp-block-media-text[class*="background-color"]:not(.has-background-background-color) .wp-block-media-text__content a, .wp-block-media-text[style*="background-color"] .wp-block-media-text__content a {
-	color: currentColor;
-}
-
 @media only screen and (min-width: 482px) {
 	.wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__content {
 		padding-top: var(--global--spacing-vertical);
@@ -1975,6 +1981,10 @@ p.has-background {
 	padding: var(--global--spacing-unit);
 }
 
+p.has-text-color a {
+	color: var(--wp--style--color--link, var(--global--color-primary));
+}
+
 .a8c-posts-list__listing {
 	list-style: none;
 	margin: 0;

+ 1 - 2
seedlet/template-parts/content/content-excerpt.php

@@ -4,8 +4,7 @@
  *
  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 2
seedlet/template-parts/content/content-none.php

@@ -4,8 +4,7 @@
  *
  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 2
seedlet/template-parts/content/content-page.php

@@ -4,8 +4,7 @@
  *
  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 2
seedlet/template-parts/content/content-single.php

@@ -4,8 +4,7 @@
  *
  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 2
seedlet/template-parts/content/content.php

@@ -4,8 +4,7 @@
  *
  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 2
seedlet/template-parts/footer/footer-widgets.php

@@ -2,8 +2,7 @@
 /**
  * Displays the footer widget area
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 

+ 1 - 2
seedlet/template-parts/header/entry-header.php

@@ -2,8 +2,7 @@
 /**
  * Displays the post header
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 ?>

+ 1 - 2
seedlet/template-parts/header/site-branding.php

@@ -2,8 +2,7 @@
 /**
  * Displays header site branding
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 ?>

+ 2 - 3
seedlet/template-parts/post/author-bio.php

@@ -2,15 +2,14 @@
 /**
  * The template for displaying Author info
  *
- * @package WordPress
- * @subpackage Seedlet
+ * @package Seedlet
  * @since 1.0.0
  */
 
 if ( (bool) get_the_author_meta( 'description' ) ) : ?>
 <div class="author-bio">
 	<?php
-	_e(__( 'Published by', 'seedlet' ));
+	_e( 'Published by', 'seedlet' );
 	?>
 	<h2 class="author-title">
 		<span class="author-heading">

+ 0 - 22
varia/inc/customize-message-wpcom.js

@@ -1,22 +0,0 @@
-/**
- * File customize-preview-wpcom.js.
- *
- * Instantly live-update customizer settings in the preview for improved user experience,
- * targeting the updates needed to hide the page title on the homepage on WordPress.com.
- */
-
-( function( $ ) {
-
-    'use strict';
-
-	wp.customize.bind( 'ready', function () {
-		wp.customize.panel( 'themes', function( panel ) {
-			panel.deferred.embedded.done( function() {
-				var customMessage;
-				customMessage = $( wp.template( 'varia-custom-message' )() );
-				panel.headContainer.append( customMessage );
-			} );
-		} );
-	} );
-
-} )( jQuery );

+ 6 - 2
varia/inc/wpcom.php

@@ -15,6 +15,11 @@
 function varia_wpcom_setup() {
 	global $themecolors;
 
+	// Disable automatically generated color palettes.
+	add_theme_support( 'wpcom-colors', array(
+	        'only-featured-palettes' => true,
+	) );	
+	
 	// Set theme colors for third party services.
 	if ( ! isset( $themecolors ) ) {
 		$themecolors = array(
@@ -149,10 +154,9 @@ function varia_wpcom_editor_scripts() {
 add_action( 'enqueue_block_editor_assets', 'varia_wpcom_editor_scripts' );
 
 /**
- * Enqueue CSS and JS for customizer pane.
+ * Enqueue CSS for customizer a11y warning.
  */
 function varia_enqueue_message_scripts() {
-	wp_enqueue_script( 'varia-customize-message-wpcom-script', get_template_directory_uri() . '/inc/customize-message-wpcom.js', array( 'customize-controls' ), wp_get_theme()->get( 'Version' ) );
 	wp_enqueue_style( 'varia-customize-message-wpcom-style', get_template_directory_uri() . '/inc/customize-message-wpcom.css', array(), wp_get_theme()->get( 'Version' ) );
 }
 add_action( 'customize_controls_enqueue_scripts', 'varia_enqueue_message_scripts' );