WordPress.org

Making WordPress.org

Opened 5 years ago

Closed 4 years ago

#868 closed defect (fixed)

<pre> or <code> in links have color: #000

Reported by: mrwweb Owned by: ocean90
Milestone: Priority: low
Component: Plugin Directory Keywords: good-first-bug
Cc:

Description

In the plugin repository at least, code and pre have color: #000 for their CSS. That means that if either is nested inside a link (real example on this page), you get black link text, possibly surround by blue link text.

I imagine that the color property has to stay so I guess the next best solution is an explicit color value for a pre and a code.

Attachments (1)

wp4.css (36.4 KB) - added by joefletcher 5 years ago.
3 css style changes to make a pre and a code consistent with a

Download all attachments as: .zip

Change History (6)

#1 @melchoyce
5 years ago

  • Keywords good-first-bug added

@joefletcher
5 years ago

3 css style changes to make a pre and a code consistent with a

#2 @joefletcher
5 years ago

  • Cc Joe@… added

I attached a wp4.css that should make the formatting for a pre and a code consistent with a tags. Here are the specific changes made:

/*line 34*/
a,
a pre,
a code,
#wporg-footer ul li a {
	color: #21759b;
	text-decoration: none;
	font-weight: normal;
}

/*line 41*/
a:visited,
a:visited pre,
a:visited code,
#wporg-footer ul li a:visited {
	color: #4ca6cf;
}


/*line 56*/
a:hover,
a:hover pre,
a:hover code { 
color: #d54e21;
}

#3 @joostdevalk
4 years ago

Tested this, it works, it looks good. The only think I wonder is if it were better if we did it as follows:

a,
a *

instead of

a,
a pre,
a code,

to prevent having to do this for other cases too.

#4 @joostdevalk
4 years ago

  • Cc joost@… added

#5 @ocean90
4 years ago

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

In 1688:

wp4.css: Inherit link color in nested code and pre tags.

props joefletcher for initial patch.
fixes #868.

Note: See TracTickets for help on using tickets.