Skip to content

Commit

Permalink
[css-inline-3] Define interaction with floats per <https://lists.w3.o…
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasai committed May 25, 2018
1 parent 4893b21 commit 71edb81
Showing 1 changed file with 42 additions and 6 deletions.
48 changes: 42 additions & 6 deletions css-inline-3/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1233,13 +1233,49 @@ Short paragraphs with initial letters</h4>
<h4 id="initial-letter-floats">
Interaction with floats</h4>

Floats always clear an initial letter when floated to the same side.
When floated to the opposite side,
they are pushed down to clear the initial letter
only if they have specified 'clear' to the affected side
or they do not fit without overlapping the initial letter.
<a>Initial letters</a> are not <a href="https://www.w3.org/TR/CSS21/visuren.html#floats">floats</a>:
they are <a>in-flow</a> <a>inline-level</a> content
that belongs to a <a>line box</a>.
Therefore:

Issue: Is this the behavior we want? What if the float is on the same line as the initial letter?
<ul>
<li>
The 'clear' property does not care about <a>initial letters</a>:
it neither applies to <a>initial letters</a>
nor clears them when applied to nearby floats.
<li>
Like line boxes or floats,
<a>initial letter boxes</a>
must not overlap the <a>margin boxes</a>
of any floats participating in the same <a>block formatting context</a>.
An overlapping <a>initial letter box</a>
is shifted inward or downward
until either it fits without overlapping
or there are no more floats present.
<li>
If a line box’s start edge shifts or moves down to clear a float,
an <a>initial letter</a> originating in it moves with it;
likewise if an <a>initial letter</a> shifts inward or moves downward
to clear a float,
its originating line box and subsequent line boxes
shorten and/or move accordingly.
<li>
If an <a>inline-start</a> float
originates in the first line of content
adjacent to an <a>initial letter</a>,
then it moves past the <a>initial letter</a>
towards the containing block edge,
exactly as if the <a>initial letter</a> were any other inline-level content.

However, if such a float originates
in subsequent lines of content adjacent to a (sunk) <a>initial letter</a>,
then that float must clear the <a>initial letter</a>.
</ul>

See <a href="https://www.w3.org/TR/CSS21/visuren.html#floats">CSS2&sect;9.5</a>
for more information about the layout of floats
and adjacent content.
[[!CSS2]]

<h4 id="intial-letter-breaking">
Interaction with Fragmentation (Pagination)</h4>
Expand Down

0 comments on commit 71edb81

Please sign in to comment.