Making WordPress.org

Opened 7 years ago

Closed 7 years ago

#2964 closed defect (bug) (fixed)

Handbook ToC current page hover color incorrect

Reported by: melchoyce's profile melchoyce Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Handbooks Keywords:
Cc:

Description

When you hover over the name of the page you're currently on in a handbook ToC, the text color remains #555 instead of becoming white. This is because there is a !important here:

.menu-table-of-contents-container ul a.active,
.menu-table-of-contents-container .current-menu-item > a {
  color: #555 !important;
  background-color: #fff;
}

Removing the !important fixes it, and from what I can see, doesn't seem to make a difference anyway? Any specific reason that !important was added?

See attached screenshot.

Attachments (1)

handbook-toc-hover.png (56.9 KB) - added by melchoyce 7 years ago.

Download all attachments as: .zip

Change History (3)

#1 @coffee2code
7 years ago

Looks like it was modified (and retained) for the latest revamp in r4758. Then its use was expanded in r4760. I didn't investigate the full history beyond that.

The rule only applies (causing the ticketed issue) when hovering over the ToC link for the currently loaded handbook page.

Removing the !important as suggested didn't seem to introduce any issues that I could find, so I'll roll with doing that.

#2 @coffee2code
7 years ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to closed

In 5682:

Breathe: Remove seemingly unnecessary !important in a style for the handbook.

Its use caused the hover text color for the current handbook page's sidebar menu link to remain dark instead of becoming white.

Props melchoyce.
Fixes #2964.

Note: See TracTickets for help on using tickets.