Page 1 of 1

Line-height problem in forums and quoted messages

Posted: November 29th, 2002, 1:12 pm
by WeSaySo
A quoted part of a message within a forum has an incorrect CSS line-height setting.

To reproduce, turn off the min font-size pref (set it to None) and look at any post that includes a quote such as http://www.mozillazine.org/forums/viewtopic.php?t=1303&start=15. The text of the quoted part (inside the white box) will look normal. Now highlight that text with your mouse and everything will still look normal.

Turn on the minimum font size pref (I see the problem at 14px and higher) and go back to look at the quoted text box. When unselected, the text looks ok but a bit scrunched. Select the text and parts of the letters are lost to overlap.

This is probably the same error that is seen in the MS Knowledge Base articles (Bug something or other). Looking at http://www.mozillazine.org/forums/templates/subSilver/style.css, the problem is at

Code: Select all

.quote {
font-size: 11px; line-height: 125%;
}


Mixing px and % for fonts is causing the breakage. On a locally saved copy, I changed 11px to 100% and the overlapping problem disappeared.

The display bug also affects

Code: Select all

.postbody { font-size : 12px; line-height: 18px}
when a min font size larger that 16 is set. Changing these to 100% and 150%, respectively, erased the bug at all resolutions and font size settings.

Re: Line-height problem in forums and quoted messages

Posted: December 6th, 2002, 10:08 pm
by Alex Bishop
Did try this recently but it made the fonts huge (well, default sized). Really, the CSS files need to be gone through in detail, with each rule evaluated and updated.

Re: Line-height problem in forums and quoted messages

Posted: December 6th, 2002, 10:28 pm
by Stefan
WeSaySo wrote:Mixing px and % for fonts is causing the breakage.


Mixing px and % shouldn't break anything, since the % is relative the fontsize.
If it does break it's a browser bug, not a coding bug.

{ font-size : 12px; line-height: 18px}


That code could of cource be broken. Not really smart to use non relative sizes for line-height.

Re: Line-height problem in forums and quoted messages

Posted: December 7th, 2002, 7:03 pm
by WeSaySo
Stefan wrote:
WeSaySo wrote:Mixing px and % for fonts is causing the breakage.


Mixing px and % shouldn't break anything, since the % is relative the fontsize. If it does break it's a browser bug, not a coding bug.


Yes. The min font setting on Mozilla seems fubared when px and % are mixed up for font-size/line-height. I'm currently working on some testcases to see what to file something on Bugzilla about it (or avoid a dup).

But in the meantime, since Mozilla fubars it and IE has problems resizing any text size set using px, it's better to use relative sizes everywhere.

Alex Bishop wrote:Did try this recently but it made the fonts huge (well, default sized). Really, the CSS files need to be gone through in detail, with each rule evaluated and updated.


My monitor is at 1600x1200, so any text smaller than 15px is miniscule. People with lower resolutions or smaller set minimum font sizes will not see this problem.

I've looked at subSilver/style.css. If anything, some changes can be made to 1) streamline it, 2) make it consistent from rule to rule. I can do some of that stuff this weekend if it can be used.