RE: GCPM "float-offset" and centering

The goal of float properties being defined is to position a float anywhere on the page, including

* top/bottom/left/right/inside/outside
* shift and align (by absolute, percent or grid values)
* center (or align to a specified point)

Align to an arbitrary point maybe a stretch scenario, but it would be really useful for images (and a match to "fit-position"...)

We discussed earlier reusing top/bottom/left/right for float positioning. Would this work?

    img { float:page; right:1.5gr; float-offset:-50% }

(the above would center on first column gap from right; percentage in float-offset is relative to float size). This probably implies there are "inside" and "outside" positioning properties too.

Or, it would be as currently in GCPM, but have a separate "float-align" (any length value, percentage is relative to float size).

    img { float:page right; float-offset:1.5gr; float-align:50%; }

Or a simpler version, with left/right/center only:

    img { float:page right; float-offset:1.5gr; float-align:center; }

I think I prefer the first one - there is only one new property (float-offset)...

> -----Original Message-----
> From: Håkon Wium Lie [mailto:howcome@opera.com]
> Sent: Tuesday, August 28, 2007 8:55 AM

>  > "If the 'gr' unit or percentage unit is used, it means that the
>  > middle of the float should be aligned with the specified grid line
>  > (or portion thereof)."
>  >
>  > I think this mixes two different concepts (positioning and
>  > centering),
>
> I'd argue that it's still about positioning (not centering), but it
> also moves the reference point of the floated element.
>
>  > and even in the use case table
>  > (http://www.w3.org/Style/Group/css3-src/css3-gcpm/uc.html) "gr"
>  > usually just means position, only in case #30 it means centering.
>
> So, how would you like to set the reference point?
>
> In your example for use case #30, you use the percentage value to
> express centering. Do you think this is better? I'm probably ok with
> switching to percentages, in which case my example for use case #30
> would read:
>
> blockquote {
>   float: top left column;
>   float-offset: 50% 50% }
>
> The "vertical 50%" value is quite easy to explain: the midpoint of the
> float is positioned half-way down the column. Likewise, 0% and 100%
> would intuitively make sense -- at least if one knows the definition
> of "background-position".
>
> The "horizontal 50%" is harder to get. Hmm.
>
> -h&kon
>               Håkon Wium Lie                          CTO °þe®ª
> howcome@opera.com                  http://people.opera.com/howcome
>

Received on Wednesday, 29 August 2007 08:08:20 UTC