Opened 9 years ago

Closed 9 years ago

#868 closed defect (bug) (fixed)

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

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


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 9 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
9 years ago

  • Keywords good-first-bug added

9 years ago

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

#2 @joefletcher
9 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 pre,
a code,
#wporg-footer ul li a {
	color: #21759b;
	text-decoration: none;
	font-weight: normal;

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

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

#3 @joostdevalk
9 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 *

instead of

a pre,
a code,

to prevent having to do this for other cases too.

#4 @joostdevalk
9 years ago

  • Cc joost@… added

#5 @ocean90
9 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.