Skip to content

Commit 14d765d

Browse files
committed
[css-overflow-3][css-overflow-4] Allow overflow-clip-edge to take negative lengths, and apply (shrinking only) to scrollable boxes. #11355 #10745
1 parent 43e37c5 commit 14d765d

File tree

2 files changed

+23
-24
lines changed

2 files changed

+23
-24
lines changed

css-overflow-3/Overview.bs

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ Managing Overflow: the 'overflow-x', 'overflow-y', and 'overflow' properties</h3
484484
<dt><dfn>hidden</dfn>
485485
<dd>
486486
This value indicates that
487-
the box’s content is clipped to its [=padding box=]
487+
the box’s content is clipped to its [=overflow clip edge=]
488488
and that the UA must not provide any scrolling user interface
489489
to view the content outside the clipping region,
490490
nor allow scrolling by direct intervention of the user,
@@ -510,12 +510,12 @@ Managing Overflow: the 'overflow-x', 'overflow-y', and 'overflow' properties</h3
510510
the element to establish a new formatting context.
511511

512512
Note: Authors who also want the box to establish a formatting context
513-
may use ''display: flow-root'' together with ''overflow: clip''.
513+
can use ''display: flow-root'' together with ''overflow: clip''.
514514

515515
<dt><dfn>scroll</dfn>
516516
<dd>
517517
This value indicates that
518-
the content is clipped to the [=padding box=],
518+
the content is clipped to the [=overflow clip edge=],
519519
but can be scrolled into view
520520
(and therefore the box is a <a>scroll container</a>).
521521
Furthermore, if the user agent uses a scrolling mechanism
@@ -623,7 +623,7 @@ Expanding Clipping Bounds: the 'overflow-clip-margin' property</h3>
623623

624624
<pre class=propdef>
625625
Name: overflow-clip-margin
626-
Value: <<visual-box>> || <<length [0,∞]>>
626+
Value: <<visual-box>> || <<length>>
627627
Initial: ''0px''
628628
Inherited: no
629629
Applies to: boxes to which 'overflow' applies
@@ -632,10 +632,8 @@ Expanding Clipping Bounds: the 'overflow-clip-margin' property</h3>
632632
</pre>
633633

634634
This property defines the <dfn export>overflow clip edge</dfn> of the box,
635-
i.e. precisely <em>how far</em> outside its bounds
636-
the box’s content is allowed to paint
637-
before being clipped
638-
by effects (such as ''overflow: clip'', above)
635+
i.e. precisely where the box's content is allowed to paint
636+
before being clipped by effects (such as ''overflow: clip'', above)
639637
that are defined to clip to the box’s [=overflow clip edge=].
640638

641639
Values are defined as follows:
@@ -649,12 +647,12 @@ Expanding Clipping Bounds: the 'overflow-clip-margin' property</h3>
649647
If omitted,
650648
defaults to ''overflow-clip-margin/padding-box''.
651649

652-
: <dfn><<length [0,∞]>></dfn>
650+
: <dfn><<length>></dfn>
653651
::
654652
The specified offset dictates
655653
how much the [=overflow clip edge=] is expanded from
656-
the specified box edge
657-
Negative values are invalid.
654+
the specified box edge.
655+
Negative values indicate insets, instead.
658656
Defaults to zero if omitted.
659657
</dl>
660658

@@ -666,9 +664,14 @@ Expanding Clipping Bounds: the 'overflow-clip-margin' property</h3>
666664
and [[css-backgrounds-3#shadow-shape]],
667665
noting in particular the formula for outsets beyond the [=border edge=].
668666

669-
Note: This property has no effect on boxes
670-
with ''overflow: hidden'' or ''overflow: scroll'',
671-
which are not defined to use the [=overflow clip edge=].
667+
If the box is a [=scroll container=],
668+
the [=overflow clip edge=] is clamped to stay within the element's [=padding box=].
669+
(This does not affect the [=computed value|computed=] or [=used value=] of this property.)
670+
671+
Note: This property was previously defined to only affect ''overflow: clip''.
672+
It now also affects [=scroll containers=],
673+
but only to shrink the clipping edge.
674+
672675

673676
<h3 id="overflow-propagation">
674677
Overflow Viewport Propagation</h3>

css-overflow-4/Overview.bs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ Managing Overflow: the 'overflow-x', 'overflow-y', and 'overflow' properties</h3
216216
is still being worked out.
217217

218218
<h3 id="overflow-clip-margin">
219-
Expanding Clipping Bounds: the 'overflow-clip-margin-*' properties</h3>
219+
Changing Clipping Bounds: the 'overflow-clip-margin-*' properties</h3>
220220

221221
<pre class="propdef shorthand">
222222
Name: overflow-clip-margin-top, overflow-clip-margin-right, overflow-clip-margin-bottom, overflow-clip-margin-left, overflow-clip-margin-block-start, overflow-clip-margin-inline-start, overflow-clip-margin-block-end, overflow-clip-margin-inline-end
223-
Value: <<visual-box>> || <<length [0,∞]>>
223+
Value: <<visual-box>> || <<length>>
224224
Initial: ''0px''
225225
Inherited: no
226226
Logical property group: overflow-clip-margin
@@ -231,7 +231,7 @@ Expanding Clipping Bounds: the 'overflow-clip-margin-*' properties</h3>
231231

232232
<pre class="propdef shorthand">
233233
Name: overflow-clip-margin, overflow-clip-margin-inline, overflow-clip-margin-block
234-
Value: <<visual-box>> || <<length [0,∞]>>
234+
Value: <<visual-box>> || <<length>>
235235
Initial: ''0px''
236236
Inherited: no
237237
Applies to: boxes to which 'overflow' applies
@@ -262,12 +262,12 @@ Expanding Clipping Bounds: the 'overflow-clip-margin-*' properties</h3>
262262
ISSUE(7144): Application of 'overflow-clip-margin' to [=replaced elements=]
263263
is still being worked out.
264264

265-
: <dfn><<length [0,∞]>></dfn>
265+
: <dfn><<length>></dfn>
266266
::
267267
The specified offset dictates
268268
how much the [=overflow clip edge=] is expanded from
269-
the specified box edge
270-
Negative values are invalid.
269+
the specified box edge.
270+
Negative values shrink the box, instead.
271271
Defaults to zero if omitted.
272272
</dl>
273273

@@ -279,10 +279,6 @@ Expanding Clipping Bounds: the 'overflow-clip-margin-*' properties</h3>
279279
and [[css-backgrounds-3#shadow-shape]],
280280
noting in particular the formula for outsets beyond the [=border edge=].
281281

282-
Note: This property has no effect on boxes
283-
with ''overflow: hidden'' or ''overflow: scroll'',
284-
which are not defined to use the [=overflow clip edge=].
285-
286282

287283
<h2 id="auto-ellipsis">
288284
Automatic Ellipses</h2>

0 commit comments

Comments
 (0)