Skip to content

Commit f7d31ba

Browse files
authored
[css-overflow][css-contain] define and use overflow clip edge (w3c#5134)
Follow-up / rephrasing of w3c#4934
1 parent 89dd543 commit f7d31ba

3 files changed

Lines changed: 16 additions & 10 deletions

File tree

css-contain-1/Overview.bs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,12 @@ Paint Containment</h3>
733733
nor does it inhibit the creation of any such mechanism through other properties,
734734
<span class=informative>such as 'overflow', 'resize', or 'text-overflow'</span>.
735735

736+
Note: The next level of this specification [[CSS-CONTAIN-2]] refines this effect
737+
to apply to the [=overflow clip edge=] rather than the [=padding edge=],
738+
in order to take the new 'overflow-clip-margin' property into account.
739+
For implementations that do not support 'overflow-clip-margin',
740+
the effect is identical.
741+
736742
Note: The behavior is described in this paragraph is equivalent to changing
737743
''overflow-x: visible'' into ''overflow-x: clip''
738744
and

css-contain-2/Overview.bs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -873,14 +873,14 @@ Paint Containment</h3>
873873

874874
1. The contents of the element
875875
including any [=ink overflow|ink=] or [=scrollable overflow=]
876-
must be clipped to the <a>padding edge</a> of the [=paint containment/containing box=],
876+
must be clipped to the <a>overflow clip edge</a> of the [=paint containment/containing box=],
877877
taking <a>corner clipping</a> into account.
878878
This does not include the creation of any mechanism
879879
to access or indicate the presence of the clipped content;
880880
nor does it inhibit the creation of any such mechanism through other properties,
881881
<span class=informative>such as 'overflow', 'resize', or 'text-overflow'</span>.
882882

883-
This clipping shape respects 'overflow-clip-margin',
883+
Note: This clipping shape respects 'overflow-clip-margin',
884884
allowing an element with [=paint containment=]
885885
to still slightly overflow its normal bounds.
886886

css-overflow-3/Overview.bs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,8 @@ Scrolling and Clipping Overflow: the 'overflow-x', 'overflow-y', and 'overflow'
383383

384384
<dt><dfn>clip</dfn>
385385
<dd>
386-
Like ''hidden'',
387-
this value indicates that
388-
the box’s content is clipped to its padding box
386+
This value indicates that
387+
the box’s content is clipped to its [=overflow clip edge=]
389388
and that no scrolling user interface should be provided by the UA
390389
to view the content outside the clipping region.
391390
In addition, unlike ''overflow: hidden''
@@ -511,19 +510,20 @@ Expanding ''overflow:clip'' Bounds: the 'overflow-clip-margin' property</h3>
511510
the element is allowed to paint
512511
before being clipped.
513512

514-
Values are defined as follows:
513+
The <dfn export>overflow clip edge</dfn> initially coincides with the [=padding edge=],
514+
but can be expanded outwards by 'overflow-clip-margin',
515+
as defined below.
515516

517+
Values are defined as follows:
516518
<dl dfn-type=value dfn-for=overflow-clip-margin>
517519
: <dfn><<length [0,∞]>></dfn>
518520
::
519521
If the element does not have ''overflow: clip''
520522
(or another property defined to respect this property),
521523
this property has no effect.
522524

523-
Otherwise, dictates how much the clipping shape is expanded
524-
from its initial shape.
525-
The clipping shape is expanded outward in all directions
526-
by the specified <<length>>,
525+
Otherwise, the specified length dictates
526+
how much the [=overflow clip edge=] is expanded from the [=padding edge=],
527527
in exactly the same way as a 'box-shadow' grows
528528
due to a positive spread distance
529529
(including the effect on rounded corners).

0 commit comments

Comments
 (0)