#633 closed enhancement (fixed)
Simplify fonts in css
Reported by: | dju` | Owned by: | Christian Boos |
---|---|---|---|
Priority: | normal | Milestone: | 1.3.2 |
Component: | general | Version: | 0.7.1 |
Severity: | major | Keywords: | layout fontsize css +testing |
Cc: | Martin.vGagern@… | Branch: | |
Release Notes: |
Relative font sizes are used in Trac CSS stylesheets. |
||
API Changes: | |||
Internal 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 (0)
Change History (32)
comment:1 by , 20 years ago
Keywords: | layout added |
---|---|
Owner: | changed from | to
comment:2 by , 20 years ago
Milestone: | → 0.8 |
---|---|
Priority: | normal → low |
Severity: | normal → minor |
Status: | new → assigned |
comment:3 by , 20 years ago
comment:4 by , 20 years ago
Summary: | simplify fonts in css → 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:6 by , 20 years ago
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.
follow-up: 11 comment:7 by , 20 years ago
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 by , 19 years ago
Milestone: | 0.9 |
---|
comment:9 by , 18 years ago
Keywords: | css added |
---|---|
Milestone: | → 2.0 |
Owner: | removed |
Status: | assigned → new |
comment:10 by , 16 years ago
Keywords: | fontsize added |
---|---|
Priority: | low → normal |
comment:11 by , 16 years ago
Cc: | 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 by , 15 years ago
Milestone: | 2.0 → 0.13 |
---|
#6771 (IE rendering h4 larger than h3) should be verified and addressed while reworking this.
comment:13 by , 15 years ago
Milestone: | next-major-0.1X → unscheduled |
---|
follow-up: 15 comment:14 by , 15 years ago
Milestone: | unscheduled → next-major-0.1X |
---|---|
Owner: | set to |
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:
- use templates to generate CSS,
- or use CleverCSS (clevercss.py)
comment:15 by , 12 years ago
Milestone: | next-major-releases → next-dev-1.1.x |
---|---|
Priority: | normal → high |
Severity: | minor → major |
comment:16 by , 12 years ago
So is this ticket also going to find a girlfriend and move out of the house when it reaches 18 years of age? That'd be an interesting resolution name to register in Trac :> "agelegal", or something.
I'd say let's pick LESS and just roll with it. This is mostly based on what I've heard people talk about the most. I doubt there's a significant % of difference in the technical overhead of either choice.
follow-up: 18 comment:17 by , 10 years ago
I'm thinking of adopting this issue as my first task in Trac,
Less CSS support can be implemented using this, for example: https://github.com/robotis/Lesscpy/
this works on python 3
comment:18 by , 10 years ago
Replying to asaf@…:
I'm thinking of adopting this issue as my first task in Trac,
Less CSS support can be implemented using this, for example: https://github.com/robotis/Lesscpy/
this works on python 3
It looks like there may be some overlap with #10672.
For your first task in Trac, I might suggest starting with a smaller ticket. The bitesized tickets offers are some good choices.
comment:19 by , 10 years ago
Milestone: | next-dev-1.1.x → next-major-releases |
---|
Retargetting tickets to narrow focus for milestone:1.2. Please move the ticket back to milestone:next-dev-1.1.x if you intend to resolve it by milestone:1.2.
comment:20 by , 10 years ago
Owner: | removed |
---|
comment:21 by , 9 years ago
Type: | defect → enhancement |
---|
Marking as enhancement as per TracTicketTriage.
comment:22 by , 8 years ago
Milestone: | next-major-releases → 1.3.2 |
---|---|
Priority: | high → normal |
Sorry, this ticket probably won't reach 18 years before completion (we tried hard though ;-) ).
comment:24 by , 8 years ago
Keywords: | +testing added |
---|
comment:26 by , 8 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Fixed in r15523.
Who said 10 years old tickets never get done? ;-)
(13 years old actually, time flies…)
follow-up: 28 comment:27 by , 7 years ago
The font-size is decreased by body { font-size: .9em }
in r15561. However, I'm getting too small font on my browser which configures 14px as default font size. We should use absolute font size rather than relative font size.
-html { overflow-y: scroll } +html { overflow-y: scroll; font-size: 16px }
Currently, as the workaround, the following style is configured using <profile>/chrome/userContent.css.
@-moz-document domain(edgewall.org), domain(trac-hacks.org) { html { font-size: 16px } }
comment:28 by , 7 years ago
Replying to Jun Omae:
We should use absolute font size rather than relative font size.
Your suggested change looks fine in my browsers, for which I see no change. I think your idea make sense - set the font size at the root of the document and scale everything relative to it.
comment:29 by , 7 years ago
Thanks for the comment. Currently, I'm using the following to use 14px
rather than 14.4px (16px * 0.9em)
:
@-moz-document domain(edgewall.org) { body { font-size: 14px !important } }
body { - font-size: .9em; + font-size: 14px; background: #fff; /* body_bg */
follow-up: 31 comment:30 by , 6 years ago
Well, if you set the font size to be fixed like that, the browsers will ignore the font size selected by the user in the options, which harms accessibility. At least that seems to be the case in FF and Chrome.
If you think it's more sensible to restore the body size to 100% (so that it would respect your 14px default font size) and rebalance the rest accordingly, we can try to do that. Well, initial testing shows that it's not too bad, and the actual font size will indeed match the specified size in the options. I can add that to #13116.
comment:31 by , 6 years ago
Replying to Christian Boos:
… I can add that to #13116.
Committed as r16871.
Now if your browser configures the default font size to 14px, that's what you should get.
comment:32 by , 5 years ago
Release Notes: | modified (diff) |
---|
i suggest not using px in font-size, as it breaks accessibility. the best is to use relative font-size, for example:
and set a default body font-size:
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.