Closed Bug 243100 Opened 17 years ago Closed 17 years ago

css line-height ignored in textarea

Categories

(SeaMonkey :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8alpha1

People

(Reporter: jc, Assigned: bzbarsky)

References

()

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040316
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040316

the line-height command seems to be totally ignored in text-area rendering

Reproducible: Always
Steps to Reproduce:
1. Open the page www.thp.org/lineheight.htm in IE or Mozilla
2.
3.

Actual Results:  
IE does it right, Mozilla does it wrong.

Expected Results:  
Mozilla should do it right.
Mozilla explicitly sets the line-height "textarea" in the UA stylesheet.  See
bug 82265.

I suppose we could stop doing it for textarea in particular..... (I'm not sure
what I think of that from a general "what exactly is a form control" perspective).
Page authors have enough ways to make textareas hard to use without adding
line-height as another.
Well, the issue is that we're letting the page set the font family and size but
not line-height -- that can actually decrease readability on a well-authored page.

John, how does IE handle "line-height: 0" on a textarea?
It treats it the same as 'line-height:0' on the BODY element. Showing a very
thin line of text, like Mozilla does. Only IE supports it for TEXTAREA as well.
Well, the reason bug 82265 happened was that IE does not support line-height on
some controls.

So I'd sorta like to know what IE's exact behavior is... in both backcompat and
css1compat mode, by the way.
Attached image screen shot
It shows the same behavior if I put a nice strict doctype at the top.
And the same without the explicit rule for textarea?
You found the strange IE behavior. It doesn't inherit by default. (That is the
same for standard and quirks mode.)
Ah, ok.  So just a matter of removing the !important on textarea in forms.css
then....

I think I'd be fine with that.  David?  Ian?
(In reply to comment #3)

> Well, the issue is that we're letting the page set the font family and size but
> not line-height -- that can actually decrease readability on a well-authored page.

I'm having a hard time imagining how refusing to apply anything except
line-height: normal to a textarea could make the textarea less readable, unless
of course the author was already styling the textarea with mousetype, and trying
to undo some damage with a larger line-height. Naturally in such a case I would
need to zoom anyway, and thus would not appreciate a larger line-height reducing
the amount of text that should otherwise fit in the available space.
It's fine with me, except you should remove the whole line.  The 'font'
shorthand sets 'line-height'.
Attached patch good pointSplinter Review
Attachment #148049 - Flags: superreview?(dbaron)
Attachment #148049 - Flags: review?(dbaron)
Attachment #148049 - Flags: superreview?(dbaron)
Attachment #148049 - Flags: superreview+
Attachment #148049 - Flags: review?(dbaron)
Attachment #148049 - Flags: review+
Assignee: general → bzbarsky
Status: UNCONFIRMED → NEW
Ever confirmed: true
Fixed.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8alpha
Product: Browser → Seamonkey
*** Bug 304990 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.