Skip to content

Commit

Permalink
[css-overflow-4] Adjust handling of -webkit-box and -webkit-box-orient
Browse files Browse the repository at this point in the history
See #10324
  • Loading branch information
frivoal committed Jun 14, 2024
1 parent 544f0df commit 3e2b38d
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions css-overflow-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -922,17 +922,11 @@ Legacy compatibility</h4>
* it sets 'continue' to ''-webkit-discard'' instead of ''discard''
* it unconditionally sets 'block-ellipsis' to ''block-ellipsis/auto''

Additionally, for children (including anonymous children)
of boxes whose 'display' property computes to ''-webkit-box'' or ''-webkit-inline-box'',
the used values of the 'max-lines', 'continue', and 'block-ellipsis' properties
are taken from the computed values of the parent box;
the computed values of these properties on the box itself are ignored.

The <dfn value for=continue>-webkit-discard</dfn> value behaves identically to ''discard'',
except that it only takes effect
if the computed value of the 'display' property on the parent
if the value of the 'display' property
is ''-webkit-box'' or ''-webkit-inline-box''
and the computed value of the '-webkit-box-orient' property on the parent
and the value of the '-webkit-box-orient' property
is ''-webkit-box-orient/vertical''.

Note: Implementations of the legacy '-webkit-line-clamp' property
Expand Down Expand Up @@ -1127,6 +1121,22 @@ Fragmentation of Overflow: the 'continue' property</h3>
if it is laid out above the position
representing the end of this <a>fragmentation container</a>.

Additionaliy,
for compatibility (see [[#webkit-line-clamp]]),
when the [=computed value=] of the 'continue' property is ''discard''
and the [=computed value=] of the '-webkit-box-orient' property is ''vertical'':
* If the [=computed value=] of the 'display' property is ''-webkit-box'',
the box establishes a [=BFC=] as if it had been ''flow-root''.
* If the [=computed value=] of the 'display property is ''-webkit-inline-box'',
the box establishes a [=BFC=] as if it had been ''inline-block''.

Note: This means that 'line-clamp' will work
if both or neither of ''-webkit-box-orient: vertical''
and ''display: -webkit-box'' or ''display: -webkit-inline-box'' are set,
but not if ''display: -webkit-box'' or ''display: -webkit-inline-box'' is set
while ''-webkit-box-orient: vertical'' isn't,
as the box would be a [=flex container=] rather than a [=block container=],
and thus the 'continue' property would not apply.

<h2 id=sbg-ext class=nonum>
Appendix A: Possible extensions for ''scrollbar-gutter''</h2>
Expand Down Expand Up @@ -1445,6 +1455,10 @@ Recent Changes</h3>
(<a href="https://github.com/w3c/csswg-drafts/issues/9815">Issue 9815</a>)
<li>Establish an Independent Formatting Context when ''continue: discard'' is used.
(<a href="https://github.com/w3c/csswg-drafts/issues/10323">Issue 10323</a>)
<li>Blockify elements with <code>(-webkit-)line-clamp</code>,
<code>display: -webkit-(inline-)box</code>
and <code>-webkit-box-orient: vertical</code>.
(<a href="https://github.com/w3c/csswg-drafts/issues/10324">Issue 10324</a>)
</ul>

<h3 id="changes-l3">
Expand Down

0 comments on commit 3e2b38d

Please sign in to comment.