Edgewall Software
Modify

Ticket #633 (new defect)

Opened 8 years ago

Last modified 2 years ago

Simplify fonts in css

Reported by: dju` Owned by: cboos
Priority: normal Milestone: next-major-0.1X
Component: general Version: 0.7.1
Severity: minor Keywords: layout fontsize css
Cc: Martin.vGagern@…
Release Notes:
API Changes:

Description

there are many (redundant) font-family definitions in the css files. it makes hard to override styles in per-project templates, i.e. with a simple "body {font-family: Tahoma}".

Attachments

Change History

comment:1 Changed 8 years ago by cmlenz

  • Keywords layout added
  • Owner changed from jonas to cmlenz

comment:2 Changed 8 years ago by cmlenz

  • Milestone set to 0.8
  • Priority changed from normal to low
  • Severity changed from normal to minor
  • Status changed from new to assigned

comment:3 Changed 8 years ago by dju`

i suggest not using px in font-size, as it breaks accessibility. the best is to use relative font-size, for example:

h1 { font-size: 1.9em }
h2 { font-size: 1.45em }
h3 { font-size: 1.2em }
h4 { font-size: 1em }
...

and set a default body font-size:

body { font-size: 13px }

or better, font-size: medium, but IE's medium size is bigger than Netscape's one. A trick to fool IE might be used here.

comment:4 Changed 8 years ago by cmlenz

  • Summary changed from simplify fonts in css to Simplify fonts in css

[943] removes superfluous font-family declarations from browser.css. That leaves us with three font-family declarations in trac.css. Those three differ and cannot be removed without altering the presentation.

I'm not so sure about using relative font-sizes throughout the style sheets. That's a bigger change that would need quite a bit of testing between different browsers/platforms.

comment:5 Changed 8 years ago by cmlenz

  • Milestone changed from 0.8 to 0.9

Postponing.

comment:6 Changed 8 years ago by Martin Bialasinski <agr30@…>

If relative font sizes are to be used, the proper way is to set the size in body to 100% and then set h1 to 200% etc. Thus respecting the font size the user has defined as his prefered normal font size.

Using em sizes instead of percentages should theoretically be no difference, but IE screws it up with sizes smaller than 1em and font set to "Smaller" in the browser.

comment:7 follow-up: Changed 7 years ago by dju`

I often use something like:

body {
   [...]
   font-size:smaller;	/* font size for IE */
}
html>body { font-size:small; } /* escaping IE, font size for others */

to unify font sizes in mozilla browsers and IE. Then I use relative (em) font sizes.

comment:8 Changed 7 years ago by cmlenz

  • Milestone 0.9 deleted

comment:9 Changed 5 years ago by cboos

  • Keywords css added
  • Milestone set to 2.0
  • Owner cmlenz deleted
  • Status changed from assigned to new

comment:10 Changed 3 years ago by cboos

  • Keywords fontsize added
  • Priority changed from low to normal

Two other tickets in favor of relative font size:

comment:11 in reply to: ↑ 7 Changed 3 years ago by Martin.vGagern@…

  • Cc Martin.vGagern@… added

Replying to dju`:

I often use something like […] to unify font sizes in mozilla browsers and IE.

I don't believe that unified font sizes are a desirable goal. In both browsers, users can configure their default font size. Users that do so should find their expressed preference honoured. Users that don't configure their browser might choose one or the other because of its default configuration options.

So I'd say the main goal should be to bulk of the text content displayed in the configured default font size, and to use relative font sizes (be it em or percent) for parts to be displayed differently.

comment:12 Changed 3 years ago by cboos

  • Milestone changed from 2.0 to 0.13

#6771 (IE rendering h4 larger than h3) should be verified and addressed while reworking this.

comment:13 Changed 2 years ago by rblank

  • Milestone changed from next-major-0.1X to unscheduled

comment:14 Changed 2 years ago by cboos

  • Milestone changed from unscheduled to next-major-0.1X
  • Owner set to cboos

I'd like to keep this one on the radar. This can be part of a general overhaul of the CSS:

  • use trac- prefix more consistenly
  • use variables for fonts, sizes, colors:
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from cboos. Next status will be 'new'
The owner will be changed from cboos to anonymous. Next status will be 'assigned'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.