Skip to content

Fix button text color overridden by region link color rules#766

Open
jjroelofs wants to merge 2 commits into8.xfrom
jur/8.x/765-fix-button-text-color-in-regions
Open

Fix button text color overridden by region link color rules#766
jjroelofs wants to merge 2 commits into8.xfrom
jur/8.x/765-fix-button-text-color-in-regions

Conversation

@jjroelofs
Copy link
Copy Markdown
Collaborator

@jjroelofs jjroelofs commented Feb 12, 2026

Linked issues

Summary

Region-level a { color: ... } CSS rules override Bootstrap button text colors when buttons use <a> elements. This is the same bug class fixed in PR #726 for cards.

Problem

Bare a selectors in region SCSS set link colors that bleed into <a class="btn ..."> elements:

  • .dxpr-theme-header a { color: headertext } — overrides btn-primary/btn-secondary text color
  • .dxpr-theme-main-menu a { color: headertext } — same issue in main menu
  • #secondary-header a { color: secheadertext } — affects buttons in secondary header
  • .dxpr-theme-footer a { color: footertext } — affects buttons in footer
  • .region-sidebar-first/second a { color: text } — affects sidebar buttons
  • .content .list-inline a { color: text } — affects inline list buttons

Solution

Apply a:not(.btn) exclusion to all affected selectors, matching the pattern from PR #726.

Files Changed

  • scss/components/dxpr-theme-header.scss — 2 selectors updated (lines 32, 72)
  • scss/components/dxpr-theme-secondary-header.scss — 1 selector updated (line 12)
  • scss/base/layout.scss — 1 selector updated (footer, line 259)
  • scss/base/typography.scss — 2 selectors updated (lines 109, 215)
  • Compiled CSS for all above

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)
  • All new and existing tests passed.

Add :not(.btn) exclusion to bare `a` selectors in header,
secondary header, footer, sidebar, and list-inline regions.
This prevents region link colors from overriding Bootstrap
button text colors, following the same pattern established
in PR #726 for cards.

Closes #765
@jjroelofs jjroelofs force-pushed the jur/8.x/765-fix-button-text-color-in-regions branch from 79f2208 to 41f78e3 Compare February 12, 2026 08:43
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.

1 participant