Edgewall Software
Modify

Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#10592 closed defect (fixed)

Change default style for `inline code` to have gray background

Reported by: anatoly techtonik <techtonik@…> Owned by: Christian Boos
Priority: normal Milestone: 1.0
Component: wiki system Version: 0.12.3
Severity: normal Keywords: css
Cc: ryano@… Branch:
Release Notes:

default style for inline code adopted the Trac Hacks color and has now a gray background

API Changes:
Internal Changes:

Description

It is very hard to search for inline code in Trac wiki. It would be extremely handy if default style for inline code snippets was rendered on the same gray background as code blocks by default. Much like stackoverflow and github do.

Attachments (0)

Change History (14)

comment:1 by anatoly techtonik <techtonik@…>, 13 years ago

For an exercise count the amount of inline code blocks in the ticket description. ;)

comment:2 by anatoly techtonik <techtonik@…>, 13 years ago

Version: 0.12.3

comment:3 by Christian Boos, 13 years ago

Keywords: css added
Milestone: 0.13

Big +1 from me.

comment:4 by anatoly techtonik <techtonik@…>, 13 years ago

tt {
 background-color: #F7F7F7;
}

, but it would be much more nicer if Trac wrapped wiki-formatted content into appropriate style blocks, so that the style could be written as

.wiki .code {
 background-color: #F7F7F7;
 font-family: monospace;
}

and the generated markup will be something like

<div class="wiki">
Some <span class="code">nice stuff</span> to play with.
</div>

comment:5 by Christian Boos, 13 years ago

Well, XHTML has already a wide range of semantic markup that we could use:

code | samp | kbd | var

… or just keep tt as really it's just appropriate to group all the possible meaning associated to the use of a monospace/teletype font (besides the ones from XHTML: paths, error messages, hostnames, user names, etc.)

I'd propose something like:

tt {
 color: #600;
 border: 1px solid #CBA;
 padding: 0 0.3em;
 background: #F7F7F7;
}

Here's how this would look like on the common standard backgrounds:


just keep tt (normal wiki, comments)

just keep tt (ticket description)

just keep tt (preview)

comment:6 by anatoly techtonik <techtonik@…>, 13 years ago

LGTM.

comment:7 by Remy Blank, 13 years ago

I was going to write that I find the inline code spans in StackOverflow very ugly, but your variant with the border actually looks pretty nice. So +1 from my side.

comment:8 by osimons, 13 years ago

I like. +1.

comment:9 by Remy Blank, 12 years ago

Owner: set to Christian Boos

comment:10 by Christian Boos, 12 years ago

Going to be part of the branch dedicated to #10012.

comment:11 by Ryan J Ollos <ryano@…>, 12 years ago

Cc: ryano@… added

comment:12 by Christian Boos, 12 years ago

comment:13 by Christian Boos, 12 years ago

Resolution: fixed
Status: newclosed

Fixed as part of r11129.

comment:14 by Christian Boos, 12 years ago

Release Notes: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.