Skip to content

Fix hover style for Colored Background and Colored Text modes#790

Open
jjroelofs wants to merge 1 commit into8.xfrom
jur/8.x/785-fix-hover-style-colored-background-text
Open

Fix hover style for Colored Background and Colored Text modes#790
jjroelofs wants to merge 1 commit into8.xfrom
jur/8.x/785-fix-hover-style-colored-background-text

Conversation

@jjroelofs
Copy link
Collaborator

Summary

  • Removes transparent and inherit fallback values from base hover var() calls in dxpr-theme-navigation-colors.scss
  • When the CSS custom properties (--dxt-setting-menu-hover-background, --dxt-setting-menu-hover-text-color, --dxt-setting-dropdown-hover-background, --dxt-setting-dropdown-hover-text-color) are not set by the user, the declarations now become invalid at computed-value time (IACVT), allowing the mode-specific selectors (hover-background, hover-text, hover-opacity) to apply their correct fallbacks (e.g., var(--dxt-color-base))
  • When a user HAS explicitly set these variables via theme settings, they still apply in all modes

Test plan

  • Select "Colored Background" hover style in theme settings and verify menu items get a colored background on hover (should use the primary/base color)
  • Select "Colored Text" hover style and verify menu item text changes color on hover (should use the primary/base color)
  • Select "Opacity" hover style and verify it still works (opacity change on hover)
  • Set a custom hover background color in theme settings and verify it applies regardless of hover mode
  • Test dropdown menu hover styles behave correctly in all modes
  • Verify mobile menu hover styles are unaffected

Fixes: #785

…odes

Remove fallback values (transparent/inherit) from base hover CSS var()
calls so that when the variables are unset, the declarations become
invalid at computed-value time and the mode-specific fallbacks
(--dxt-color-base) take over correctly.

Fixes: #785
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hover Style 'Colored Background' and 'Colored Text' not working

1 participant