-
Notifications
You must be signed in to change notification settings - Fork 756
Description
There is a common requirements for page (or column) floats that cannot be achieved with the current spec, but could be with a minor tweak.
Authors often want a figure to be floated either to the top or the bottom of the page, whichever is nearest.
This could be achieved by amending the definition of snap-block() as follow:
If
nearis in effect and the element is within the specified distance both from thestartand theend,the nearest edge wins. In case the distance to theendstartandendedges is equal, theendedge wins.
Also, for convenience, and to prevent authors from needing to write snap-block(9999px, near) or other arbitrarily large values just to make sure both edges are within the specified distance, we suggest that the definition of snap-block (without parentheses) is changed to mean snap-block( infinity, near) instead of snap-block(2em, near)
The same changes should be done to snap-inline.
Note: regardless of whether we fix that or not, we need a precise definition of how to measure that distance. I'll file a separate issue for that.