W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: [css4-ui] Proposal for new property for text overflow on single-line text inputs

From: Jon Lee <jonlee@apple.com>
Date: Mon, 16 Jan 2012 11:46:47 -0800
Cc: www-style@w3.org
Message-id: <AC993A8D-8AFE-4288-BB01-6523B62C7806@apple.com>
To: Mats Palmgren <mats@mozilla.com>
We believe the unique behavior of showing and hiding the ellipsis based on focus warrants a new property.

text-overflow has thus far acted as a "static" property, in that web authors would expect that anything styled with it should remain as such, even in the focus case. As an author, I would find it strange that upon focus of a text input the ellipsis would just disappear. I would think that I should instead include the style

input:focus { text-overflow: clip; }

or something of that nature. The unfortunate consequence is that it also implies that I could state

input:focus { text-overflow: ellipsis; }

which, as you mentioned, would interfere with the user's ability to edit the text. Encapsulating this whole behavior with a property mitigates both issues.

Given this line of reasoning, I would concede that since <select>s would not exhibit this focus behavior, text-overflow could be used for those elements.


On Jan 15, 2012, at 10:04 AM, Mats Palmgren wrote:

> FYI, the behavior you describe is implemented in Gecko for
> "text-overflow:ellipsis" for single- and multiple-line text
> controls.  This is to avoid the ellipsis interfering with
> the text caret and the user's ability to edit the text.
> The text-overflow spec already allows for this behavior for
> text controls so I don't see the need for a separate property.
> http://dev.w3.org/csswg/css3-ui/#text-overflow0
> /Mats
Received on Monday, 16 January 2012 19:45:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:09 UTC