Project

General

Profile

Actions

Bug #1267

closed

Inappropriate font choice in HTML-output from mod_dirlisting

Added by rasmus over 17 years ago. Updated over 17 years ago.

Status:
Fixed
Priority:
Normal
Category:
mod_dirlisting
Target version:
ASK QUESTIONS IN Forums:

Description


"Courier New", Courier, monospace

should be


monospace

Specifying monospace will cause the client browser to chose the most appropriate font for monospace (often chosen by the user). Explicitly specifying a certain typeface will override the users choice.

So, the HTML/CSS output should be adjusted not to override the users' settings.

My suggestion is to update mod_dirlisting.c to generate this css instead:


a, a:active {text-decoration: none; color: blue;}
a:visited {color: #48468F;}
a:hover, a:focus {text-decoration: underline; color: red;}
h2 {margin-bottom: .6em;}
table {margin-left: .7em;}
th, td { font-family: monospace; text-align: left;}
th { font-weight: bold; padding-right: 1.2em; padding-bottom: .4em;}
td {padding-right: 1.2em;}
td.s, th.s {text-align: right;}
div.list { border-top: 1px solid #999; border-bottom: 1px solid #999; padding-top: .6em; padding-bottom: 1em;}
div.foot { font-family: monospace; font-size: 90%; color: #777; padding-top: .5em;}

That would allow for respecting user configuration, be easily printable and zoom as expected in web browsers that support it.[


Files

lighttpd_index_font_size.patch (679 Bytes) lighttpd_index_font_size.patch font size / font face directory index patch xxv, 2007-08-11 14:47
Actions #1

Updated by xxv over 17 years ago

I added a patch that applies this change and also uses the user's default font sizes. "pt" sizes are inappropriate for text intended to be read on a screen, as points are a physical units of measure akin to inches.

Actions #2

Updated by rasmus over 17 years ago

Great!

Actions #3

Updated by jan over 17 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

applied in r1897 for 1.5.0.

Actions

Also available in: Atom