Re: [css-shapes] how to size and position <image>s

On 10/16/2013 02:08 PM, Alan Stearns wrote:
> On 10/16/13 1:18 PM, "fantasai" <fantasai.lists@inkedblade.net> wrote:
>>
>> Then where is the shape positioned if it is not the same size as the
>> element?
>
> The shape should definitely not be centered, as that could cause a
> mis-registration with a displayed image. The size and position of the
> shape-from-image should not be the concern. What is important is sizing
> and positioning the image the shape is derived from. There are some cases
> in level 1 where mis-registration can occur, but the simple cases are
> covered. I'd like to see if we need to define anything for this in level 2
> (see below).

I don't know what you mean by this paragraph...

Let's say you have
   shape-outside: attr(src url);
   padding: 1em;
   border: 0.5em;
   box-sizing: padding-box;
   object-fit: contain;

<img src="picture.svg">

What is the size and position of the shape? By what rules is that derived?

>>> Sizing the shape from an image follows the Concrete Object Size
>>> Resolution
>>> section from [CSS3-IMAGES].
>>
>> Yes, but with what default object size?
>
> I'm assuming it's the same as for an image element?

I think that assumption needs to be in the spec. :)

>> Yeah, thinking, if we have those properties, what would be the impact
>> on positioning <basic-shape>s.
>
> This seems like a profusion of properties without a demonstrated need. In
> particular, since shapes are used in a number of places [...]
>
> We've discussed this before, and decided not to go down this route. In
> most cases, the shape-from-image you want is already sized, positioned and
> displayed either as the content of an element or a background. I'd rather
> define a shape-outside value for taking the shape from displayed content
> and/or background than recapitulate all of the sizing and positioning
> properties for every use of shapes.

That makes sense to me.

~fantasai

Received on Thursday, 17 October 2013 08:51:06 UTC