Re: [css-flexbox] Textarea as a flex container

Many thanks Boris, although I'm still slightly puzzled, because
textarea is explicitly listed under the "non-replaced elements"
section of the HTML5 Rendering spec (see here:
http://www.w3.org/TR/html5/rendering.html#form-controls).

I know that form controls were explicitly given as examples of
replaced elements back in CSS1 days, but that appears to have vanished
over the years, and I thought that particular bit of HTML5 had now
formalised the fact that they should now be treated as non-replaced.

But I don't follow this closely, and perhaps I've misunderstood?

I was/am completely unaware of your second point, about the difference
between a textarea's rendering and its DOM nodes. Not sure I fully
understand the implications. However, taken in conjunction with the
above point about it being non-replaced, I *think* this suggests that
textarea's resistance to CSS-styling is an implementation detail,
rather than an intention of the spec. Is that fair?

J.

On 13 October 2015 at 16:09, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 10/12/15 9:26 PM, John Waterson wrote:
>>
>> Looking for some guidance from the flexbox spec authors as to whether
>> the textarea element should, at least in theory, be able to act as a
>> flex container.
>
>
> <textarea> is a replaced element, so from the point of view of CSS it's not
> a container of any kind.  It's a leaf, whose rendering is not defined by CSS
> at all.  At least in theory; in practice UAs apply a random set of CSS
> properties to the insides of <textarea> in random ways that are not defined
> in any spec.
>
>> I have already raised this question on flexbugs, and was advised to
>> ask on www-style for clarification, on the reasonable grounds that
>> textarea is a bit odd as a container, in that it usually only contains
>> text nodes.
>
>
> It doesn't, though.  Or more precisely, the text that it renders and the
> text nodes that it contains in the DOM are not at all the same thing.
>
> -Boris
>

Received on Tuesday, 13 October 2015 16:17:46 UTC