Re: New values for Float property

> If we continue this concept, such values or properties can be applied for
> these styles too:
> padding-left
> padding-right
> border-left
> border-right
> outline-left
> outline-right
> margin-left
> margin-right
> background-position
> and more if there is any...

A little while ago, I was involved in some experimentation with multi-column layout
(with either paged or horizontal scrolling rather than vertical scrolling)
and allowing floats to span more than one column.

One issue in that circumstance is that in general the author doesn't know how
wide the float is compared to the column width: one or the other might depend
on the viewer's chosen font size or window size.

(E.g. One wants the column width to depend in part on window size because
 obviously one doesn't want columns to be wider than the window, and more
 generally it's usually good for there to be an integer number of columns per
 window width because it isn't very useful to have a column only partly
 visible in the window.)

In this case, the author cannot know ahead of time[*1] whether the float will
look best floated to one side of the current column or spanning two columns (or
other arrangements): it will vary when the viewer resizes the window or changes
the font size.

One nonobvious consequence was that float padding became wrong when using
existing web pages as input: we found that in most cases (all cases that we
saw), 'padding-left' and 'padding-right' (and margin- and border-) should
actually be reinterpreted as "padding on the side on which text flows down" and
"padding on the side facing the page margin / column gap" (respectively if the
original had float:right, or swapped for float:left).  If the float ended up
centred in a column gap and half covering each of the neighbouring columns,
then both sides get the "text-side" values of padding/border/margin.

Thus, I wonder whether the appropriate modifications of margin-left etc.
are not things that depend on whether direction is rtl or ltr but rather
that depend on the placement of the box relative to flowing content.

Alternatively, perhaps we want something that collapses with page margin /
column gap.

These approaches have value even for standard single-column layout, because the
same margin/border/padding values can be used for all floats, even when using a
mix of float:{left,right} and float:{start,end}.

I'm not a designer, so take the concrete suggestions with a grain of salt;
the point of this message is to draw attention to a type of page layout that isn't
well catered for by fixed left/right sides.

pjrm.


[*1] Of course the author may know what looks best in a particular circumstance,
 and might specify how to place the float as a function of the circumstances,
 but the point is that the placement will vary.

Received on Monday, 30 November 2009 23:34:45 UTC