Skip to content

Commit da19cb2

Browse files
fix (global color scheme): revert to fix hover styles
1 parent e1a1a8a commit da19cb2

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/plugins/global-settings/color-schemes/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ public function generate_css_rules( $scheme, $mode = '' ) {
426426
}
427427

428428
$inherited_value = $this->get_inherited_value( $scheme[ $property ], $state, $mode );
429-
if ( $state === 'desktopHover' && ! $this->has_value( $scheme, $property, $state ) && $mode === 'container' ) {
429+
if ( $state === 'desktopHover' && ! $this->has_value( $scheme, $property, $state ) ) {
430430
$decls[ $state ][ $css_property ] = $inherited_value;
431431
}
432432

src/plugins/global-settings/color-schemes/utils.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,12 @@ export const getCSS = ( scheme, currentHoverState = 'normal', mode = '' ) => {
9898
decls.desktopHover.push( `${ customProperty }-parent-hover: ${ inheritedValue };` )
9999
}
100100

101-
if ( state === 'desktopHover' && ! scheme[ property ]?.[ state ] && inheritedValue && mode === 'container' ) {
101+
if ( state === 'desktopHover' && ! scheme[ property ]?.[ state ] && inheritedValue ) {
102102
decls[ state ].push( `${ customProperty }${ suffix }: ${ inheritedValue };` )
103103
}
104104

105105
if ( currentHoverState !== 'normal' ) {
106-
const currentHover = mode === '' && currentHoverState === 'parent-hover' ? ''
107-
: ( currentHoverState === 'hover' && ! scheme[ property ]?.desktopHover ) ? '-parent-hover'
108-
: `-${ currentHoverState }`
109-
106+
const currentHover = mode === '' && currentHoverState === 'parent-hover' ? '' : `-${ currentHoverState }`
110107
decls.desktopHover.push( `${ customProperty }-current-hover: var(${ customProperty }${ currentHover });` )
111108
}
112109

0 commit comments

Comments
 (0)