소스 검색

Use custom background color for high-contrast

Continuing #3105 but ensuring that the background color is used as the
high contrast background color when set in the .org color customizer.
Jason Crist 4 년 전
부모
커밋
c79ed00ea2
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      seedlet/classes/class-seedlet-custom-colors.php

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

@@ -245,6 +245,10 @@ class Seedlet_Custom_Colors {
 				if ( $theme_mod_variable_name === '--global--color-foreground' && $theme_mod_default_color !== $theme_mod_custom_color ) {
 					$theme_css .= '--global--color-foreground-low-contrast: ' . $adjusted_color . ';';
 				}
+
+				if ( $theme_mod_variable_name === '--global--color-background' && $theme_mod_default_color !== $theme_mod_custom_color ) {
+					$theme_css .= '--global--color-background-high-contrast:' . $theme_mod_custom_color . ';';
+				}
 			}
 		}