Re: [css3-regions] flow-into: <ident> content-only

On 4/19/13 3:28 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

>On Fri, Apr 19, 2013 at 3:19 PM, Brad Kemper <brad.kemper@gmail.com>
>wrote:
>> I think that would be odd, if the border was left behind, and an
>>un-border-able image was sent into the flow. Which box would be affected
>>by something like 'img { width:100px; }', and does the answer change if
>>you had 'box-sizing:border-box'?
>
>It's no odder than "<p style='flow-into: foo contents;'>foo</p>",
>which leaves the border behind and flows an unborderable anonymous
>text node into the flow.  We already have a concept of "things that
>aren't boxes, but still live in the box tree", this would just be
>adding a new one.
>
>> Also, this would be inconsistent with the way ::after cannot add
>>content inside the image's content box, because we don't treat that
>>content-box as a container.
>
>Yes, if we ended up adopting this concept, either ::before/::after
>would start working, or we'd special-case them to not work (but maybe
>allow other things to work, like setting <img
>style="display:list-item;list-style-position:inside;">).
>
>> I think it would be better if replaced elements just ignored the
>>'contents' element keyword, and just always acted as though it was
>>'element'.
>
>Possible, yeah.

(was replying to Brad, pasting and fixing up to make it look like I'm in
the right part of the conversation)

I would rather the behavior be consistent than have some elements ignore
the 'content' keyword. You can get yourself into the situation of leaving
behind a border if you use 'content' on any element, really. That's the
main reason I chose to default to 'element' - if you use 'content' you
have to think about what's going into the named flow and what remains. We
should add examples showing when it's useful to use 'content' and when
it's probably better to avoid using it. It's really best when the element
is mainly a container for other elements.

I believe ::before and ::after content stay with the element as well in
the 'content' scenario. There's nothing in the named flow to hang them
from.

Thanks,

Alan

Received on Friday, 19 April 2013 22:32:55 UTC