浏览代码

Use the background color in the menu so that it still looks ok with a dark color scheme

Ben Dwyer 4 年之前
父节点
当前提交
d01b7be65e
共有 5 个文件被更改,包括 10 次插入1 次删除
  1. 3 0
      shawburn/sass/_site-navigation.scss
  2. 2 0
      shawburn/style-editor.css
  3. 2 0
      shawburn/style-rtl.css
  4. 2 0
      shawburn/style.css
  5. 1 1
      varia/functions.php

+ 3 - 0
shawburn/sass/_site-navigation.scss

@@ -1,5 +1,6 @@
 $color_primary_default: #{map-deep-get($config-global, "color", "primary", "default")};
 $color_primary_hover: #{map-deep-get($config-global, "color", "primary", "dark")};
+$color_background: #{map-deep-get($config-global, "color", "background", "default")};
 
 /**
  * Main Menu
@@ -14,6 +15,7 @@ $color_primary_hover: #{map-deep-get($config-global, "color", "primary", "dark")
 		ul > li:hover > a,
 		ul > li.focus > a,
 		ul > li.current-menu-item > a {
+			color: $color_background;
 			background-color: $color_primary_hover;
 		}
 
@@ -36,6 +38,7 @@ $color_primary_hover: #{map-deep-get($config-global, "color", "primary", "dark")
 				}
 
 				a {
+					color: $color_background;
 					padding: map-deep-get($config-global, "spacing", "unit");
 					text-decoration: none;
 

+ 2 - 0
shawburn/style-editor.css

@@ -1765,6 +1765,7 @@ pre.wp-block-verse {
 .fse-template-part .main-navigation ul > li.focus > a,
 #site-navigation.main-navigation ul > li.current-menu-item > a,
 .fse-template-part .main-navigation ul > li.current-menu-item > a {
+	color: var(--wp--preset--color--background);
 	background-color: var(--wp--preset--color--primary-dark);
 }
 
@@ -1785,6 +1786,7 @@ pre.wp-block-verse {
 }
 
 #site-navigation.main-navigation ul li a, .fse-template-part .main-navigation ul li a {
+	color: var(--wp--preset--color--background);
 	padding: 16px;
 	text-decoration: none;
 }

+ 2 - 0
shawburn/style-rtl.css

@@ -4446,6 +4446,7 @@ table th,
 .fse-template-part .main-navigation ul > li.focus > a,
 #site-navigation.main-navigation ul > li.current-menu-item > a,
 .fse-template-part .main-navigation ul > li.current-menu-item > a {
+	color: var(--wp--preset--color--background);
 	background-color: var(--wp--preset--color--primary-dark);
 }
 
@@ -4466,6 +4467,7 @@ table th,
 }
 
 #site-navigation.main-navigation ul li a, .fse-template-part .main-navigation ul li a {
+	color: var(--wp--preset--color--background);
 	padding: 16px;
 	text-decoration: none;
 }

+ 2 - 0
shawburn/style.css

@@ -4475,6 +4475,7 @@ table th,
 .fse-template-part .main-navigation ul > li.focus > a,
 #site-navigation.main-navigation ul > li.current-menu-item > a,
 .fse-template-part .main-navigation ul > li.current-menu-item > a {
+	color: var(--wp--preset--color--background);
 	background-color: var(--wp--preset--color--primary-dark);
 }
 
@@ -4495,6 +4496,7 @@ table th,
 }
 
 #site-navigation.main-navigation ul li a, .fse-template-part .main-navigation ul li a {
+	color: var(--wp--preset--color--background);
 	padding: 16px;
 	text-decoration: none;
 }

+ 1 - 1
varia/functions.php

@@ -157,7 +157,7 @@ if ( ! function_exists( 'varia_setup' ) ) :
 		 *
 		 * - if the customizer color is empty, use the default
 		 */
-		$colors_array   = false;//get_theme_mod( 'colors_manager' ); // color annotations array()
+		$colors_array   = get_theme_mod( 'colors_manager' ); // color annotations array()
 		$default_colors = varia_default_colors();
 		$primary        = ! empty( $colors_array ) ? $colors_array['colors']['link'] : $default_colors['primary']; // $config-global--color-primary-default;
 		$secondary      = ! empty( $colors_array ) ? $colors_array['colors']['fg1'] : $default_colors['secondary'];  // $config-global--color-secondary-default;