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

On 10/17/2013 07:41 PM, Alan Stearns wrote:
> fantasai wrote:
>>
>> Okay, now let's consider an element that contains text, but has a shape
>> derived from an image. This means that the size of the image and what
>> it's box would be is potentially very different from the size of the
>> box resulting from sizing the text. That size is therefore mismatched,
>> though well-defined. What is its position with respect to the actual
>> box?
>
> I would expect the top-left corner of the image would be in the top-left
> corner of the content box. What would you suggest?

I would suggest centering the image. Any time we pick a side, it's gives
us a bias. That has two problems: it's non-symmetrical--and most designs
are better off if we're being symmetrical--and it's i18n-unfriendly.

> The basic case is a floated image where the shape is derived from that
> image, where the shape and the image should be in perfect registration. I
> think it would be fine to have a definition that fit that use case
> exactly, and that also had a well-defined size and position for the case
> you describe.

Centering would handle this case perfectly, as long as the UA uses rounding
math that ensures perfect alignment of the two copies of the image. Which
is I think a fair thing to explicitly call out as a requirement, and not
too difficult to accomplish. :)

~fantasai

Received on Friday, 18 October 2013 18:52:58 UTC