Skip to content

Footer nav walker hardcodes text-white, so links vanish on light backgrounds #13

Description

@Schmandarine

Found while building a real site in Docker.

inc/bootstrap-nav-walker.php:58, in Brmbh_Footer_Nav_Walker:

$atts .= ' class="nav-link px-0 fw-semibold text-white"';

text-white is unconditional. It is correct for the dark footer the theme assumes, and invisible on any lighter one — the colour is baked into the walker rather than coming from a token or the caller.

Observed live: the footer menu rendered white-on-light and was completely unreadable.

Options

  1. Drop the colour from the walker and let the footer's own styles set link colour — most idiomatic, since a walker should emit structure, not theming.
  2. Pass a class via wp_nav_menu( [ 'link_class' => … ] ) so the caller decides.
  3. Use a token-driven custom property (--site-footer-link-color) that the footer sets.

Option 1 or 3. Either way the walker should not know what colour the footer is.

Related

The primary nav walker (Brmbh_Bootstrap_Nav_Walker) adds no colour class at all, so header links inherit — which is why they were also unreadable against the transparent-over-white header. The two walkers should be consistent about who owns colour. See #12 for the header side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions