Re: [whatwg] Should editable elements have placeholder attribute?

On Thu, Sep 6, 2012 at 3:56 AM, Aryeh Gregor <ayg@aryeh.name> wrote:
> It should never be possible to make a contenteditable element contain
> nothing, once it has something in it, because then it would collapse
> to zero height and you wouldn't be able to click on it.  (IIRC, some
> browsers have non-standard special cases for contenteditable elements
> and make them one line high even if they're empty, but this isn't per
> spec.)

Note that this shouldn't be hard to do without magic.  Just something
like this in the UA style sheet:

[contenteditable]:empty { min-height: 1em; }

~TJ

Received on Thursday, 6 September 2012 15:32:31 UTC