Fixed fonts and <textarea> (bug:57524)

Chris Lee clee at kde.org
Tue May 13 23:50:41 BST 2003


So KHTML uses a proportional font for <textarea> elements. The bugreport 
#57524 requests that we fix this by using a fixed font - the fixed font set 
in the Konq preferences dialog, of course.

This spawned a ~30 minute discussion on IRC about what the correct behavior 
should be - and what it basically boils down to is this.

1) Most other web browsers use a fixed font. 

2) The HTML2 spec, where <textarea> was first defined, suggests using a fixed 
font for the element - however, the HTML3.2 and 4 specs seem to have altered 
this suggestion or muddled it a bit.

3) Obviously, proportional fonts tend to look nicer.... however, <textarea> 
elements also accept the parameters "rows" and "cols", which implies (in my 
mind) a fixed font.

In this case, I think that the principal of least surprise requires us to 
default to a fixed font for textareas - the current behavior is surprising 
for users who come from any other OS/web browser, and it's inconsistent. It's 
also surprising for web designers who care about the fonts used on their 
pages, because KHTML doesn't act as expected.

My suggestion is that we should change the default font for the <textarea> 
element to use the fixed font set in the preferences dialog. Anyone who wants 
proportional fonts in <textarea> elements is already setting them with a 
stylesheet in their web pages, because most other browsers are using a fixed 
font by default. (Most other browsers means Internet Explorer on Win32 as 
well as Mac, Netscape [every revision I'm aware of, including Mozilla and 
derivatives], as well as Safari, if I recall correctly.)

Maksim put a workaround in the bugreport, but I think that the workaround 
should be for users who want proportional fonts in their <textarea> elements.

Any comments, flames?

-clee




More information about the kde-core-devel mailing list