浏览代码

Change the primary hover color when the secondary color changes.

Jeffrey Ong 5 年之前
父节点
当前提交
631c10d540
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      seedlet/classes/class-seedlet-custom-colors.php

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

@@ -231,6 +231,7 @@ class Seedlet_Custom_Colors {
 				}
 				}
 
 
 				if ( $theme_mod_variable_name === '--global--color-secondary' && $theme_mod_default_color !== $theme_mod_custom_color ) {
 				if ( $theme_mod_variable_name === '--global--color-secondary' && $theme_mod_default_color !== $theme_mod_custom_color ) {
+					$theme_css .= "--global--color-primary-hover: " . $adjusted_color . ";"; // Since the default palette uses --global--color-secondary as its primary hover color, we need to change the primary hover color when a user selects a different secondary color
 					$theme_css .= "--global--color-secondary-hover: " . $adjusted_color . ";";
 					$theme_css .= "--global--color-secondary-hover: " . $adjusted_color . ";";
 				}
 				}