Re: [CSS21] [CSS3 Text] Should 'text-transform: uppercase' apply to input type="text" (text entered, typed in text field by user)?

On Jun 26, 2012, at 8:34 AM, "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu> wrote:

> I can't quite believe there's a use case of applying 'text-transform' to
> an input control. I guess browsers just implement this for consistency
> and I don't have a strong argument otherwise, but this behavior is still
> weird to me.

The use case is that the author may want their input text to be transformed.

He is one reason he may want that:

My company has a core system that stores data in all caps, and has done so for decades. The Web server may draw data from this system to pre-populate some fields of a Web form, and also from other more modern systems (supporting mixed case) to pre-populate other fields of the form. In order to give the form a unified look, I use text-transform to put everything into all caps, but that is just for what the user sees. I still want mixed case to be preserved where it exists when the form is submitted. On the "here's what you submitted" confirmation page, I can also apply text-transform there too, to show all data in all caps.

Received on Tuesday, 26 June 2012 16:30:43 UTC