Skip to content

Conversation

@jjroelofs
Copy link
Collaborator

Linked issues

Solution

This PR fixes a regression from PR #713 where menu hover styles ('Colored text' and 'Colored background') stopped working when the hover color settings were set to 'None (Theme Default)'.

Root cause: PR #713 added default values for navigation color CSS variables in variables.scss that pointed to headertext/header colors. This meant the CSS fallback syntax var(--variable, fallback) never triggered because the variable was always defined.

Fix:

  1. Remove 16 navigation color variable defaults from scss/base/variables.scss
  2. Add contextual CSS fallbacks directly in scss/components/dxpr-theme-navigation-colors.scss
  3. 'Colored text' and 'Colored background' hover styles now fall back to var(--dxt-color-base) (primary color)
  4. Other hover styles (Opacity, Border) continue to work as before

Variables removed from defaults:

  • dropdown-background, dropdown-hover-background, dropdown-hover-text-color, dropdown-text-color
  • header-block-background, header-block-text-color
  • menu-background, menu-hover-background, menu-hover-text-color, menu-text-color
  • mobile-menu-background, mobile-menu-hover-background, mobile-menu-hover-text-color, mobile-menu-text-color
  • navbar-background, navbar-text-color

Checklist

  • I have read the CONTRIBUTING.md document.
  • My commit messages follow the contributing standards and style of this project.
  • My code follows the coding standards and style of this project.
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Need to run update.php after code changes
  • Requires a change to end-user documentation.
  • Requires a change to developer documentation.
  • Requires a change to QA tests.
  • Requires a new QA test.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.

Jurriaan Roelofs added 2 commits January 8, 2026 16:34
Remove navigation color variable defaults from variables.scss and add
contextual CSS fallbacks in dxpr-theme-navigation-colors.scss.

This fixes a regression from PR #713 where menu hover styles ('Colored
text' and 'Colored background') stopped working when Menu Hover Text/
Background was set to 'None (Theme Default)'.

Changes:
- Remove 16 navigation color CSS variable defaults from variables.scss
- Add CSS fallbacks directly where variables are used
- 'Colored text' hover style falls back to var(--dxt-color-base)
- 'Colored background' hover style falls back to var(--dxt-color-base)
- Mobile menu hover also falls back to primary color for visibility

Fixes #753
@jjroelofs jjroelofs merged commit 140f89a into 8.x Jan 21, 2026
3 checks passed
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.

2 participants