Skip to content

Application of "selected" style to pure-menu-link not specific enough in dropdown use case #698

@markmatney

Description

@markmatney

Description

The current implementation applies "selected" styles to all items of a submenu when that submenu is itself the selected item of a top-level menu. This behavior is undesirable for my use case, and I am having trouble thinking of use cases where this is desirable. If every <li> is special (i.e., selected), then are any of them, really?

Expected behavior

Developers should be able to choose the subset of submenu items that should have the "selected" style applied. Adding the pure-menu-selected class to a pure-menu-item <li> should affect only its child <a> with class pure-menu-link, and no others.

Actual behavior

See above description.

Steps to Reproduce

A solution could be implemented using the child combinator syntax for the selectors on lines 55 and 56:

.pure-menu-selected > .pure-menu-link,
.pure-menu-selected > .pure-menu-link:visited {
    color: #000;
}

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions