- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Fri, 19 Apr 2013 18:01:48 -0700
- To: Brad Kemper <brad.kemper@gmail.com>
- Cc: Alan Stearns <stearns@adobe.com>, "www-style@w3.org" <www-style@w3.org>
On Fri, Apr 19, 2013 at 5:46 PM, Brad Kemper <brad.kemper@gmail.com> wrote: > On Apr 19, 2013, at 5:30 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote: >> On Fri, Apr 19, 2013 at 4:57 PM, Brad Kemper <brad.kemper@gmail.com> wrote: >>> On Apr 19, 2013, at 3:28 PM, "Tab Atkins Jr." <jackalmage@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. >>> >>> I disagree. I think it would be much odder. With text, you get font-size and other font and text properties from the new container (presumably) and the lines still wrap naturally in the new container because the line boxes still exist. What is the width and height of the image when it is content-only? Does it just fill the width of the new container? Can you no longer select it to set a width and height (or if you could select it and set those two properties, then could you set border on it as well, resulting in two borders, one attached and the other detached)? >> >> (Actually, you get your styles from your original container. You need >> to use @region to override that.) > > I stand corrected. But how would you select the image content with @region? You don't need to with text content, because the font and text properties operate directly on the glyphs and line boxes. But most other properties, like width and height, operate on the content box (or on the border box when you have box-sizing: border-box). You don't, for the same reason you can't use @region to select text. Actually, that brings up an interesting question for Alan: Alan, how are you supposed to style text that has been flowed out of an element's contents? There's no container to set properties on. You can't pretend that @region is container, because that would mean mixing properties and style rules, which is impossible due to grammar ambiguities. > OK, so I assume you are agreeing that the contents of an image box stuck into a region flow would be similarly unstylable. That just doesn't seem like a good thing to me. I would rather fix "content: url(some-image);" somehow. Yes, we definitely *also* need a way to provide a single image that causes the pseudo-element to act like a replaced element. This has been a long-standard request, but nobody working on Content has delayed it. > And I would rather be able to right a general rule about flowing content without worrying if I had it on a class that occasionally selected an image. And then having to write a separate rule for that. You... can? I'm confused about what you think will happen that's so terrible if you flow the contents of an image out. It'll look exactly like the original image, except it wont' have borders/etc. This is the same as happens with *any* element you flow content out of. ~TJ
Received on Saturday, 20 April 2013 01:02:34 UTC