W3C home > Mailing lists > Public > www-style@w3.org > October 2013

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 17 Oct 2013 01:50:38 -0700
Message-ID: <525FA4DE.2030508@inkedblade.net>
To: Alan Stearns <stearns@adobe.com>
CC: "www-style@w3.org" <www-style@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:03 UTC