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

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

From: Alan Stearns <stearns@adobe.com>
Date: Wed, 16 Oct 2013 14:08:12 -0700
To: fantasai <fantasai.lists@inkedblade.net>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <CE8449BC.31CCB%stearns@adobe.com>
On 10/16/13 1:18 PM, "fantasai" <fantasai.lists@inkedblade.net> wrote:

>On 10/16/2013 12:46 PM, Alan Stearns wrote:
>> On 10/16/13 11:30 AM, "fantasai" <fantasai.lists@inkedblade.net> wrote:
>>
>>> Actually, an interesting related question is, how do you position an
>>> <image>? We can shift circles around very powerfully if they're defined
>>> inline, but there is no way to position a circle that's been derived
>>>from an image.
>>
>> That's correct. We could extend this in future levels. Or we may find
>>that
>> getting the shape from a rendered background (with all of the
>>positioning
>> that allows) is sufficient. I don't think this is required for level 1,
>> and I'd rather get some feedback from people using level 1
>> shape-from-image to determine what is required.
>
>Then where is the shape positioned if it is not the same size as the
>element?
>(Like for masking, I think it should be centered by default, fwiw.)

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).

>
>>> While we're on it, how is that image sized? It's not defined.
>>
>>>From section 4.0:
>>
>> 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?

>
>>> And to tie that back to the main thread... if we have the ability to
>>> position an <image>, how does it interact if a <basic-shape> is given
>>> instead?
>>
>> I'm not sure I follow what you're asking here. Are you thinking ahead
>>to a
>> shape-positioning property (or set of properties)?
>
>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, you're talking
about adding something like

shape-outside-position
shape-outside-repeat
shape-outside-origin
shape-outside-size
shape-inside-position
shape-inside-repeat
shape-inside-origin
shape-inside-size
clip-path-position
clip-path-repeat
clip-path-origin
clip-path-size


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.

Thanks,

Alan
Received on Wednesday, 16 October 2013 21:08:43 UTC

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