Skip to content

Commit af26469

Browse files
committed
[css-overflow-3] Clarify that we mean the padding box (including the content area, not the actual box contents) in point 1.
1 parent 379ed9f commit af26469

File tree

2 files changed

+61
-6
lines changed

2 files changed

+61
-6
lines changed

css-backgrounds-3/Overview.bs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<pre class='metadata'>
22
Title: CSS Backgrounds and Borders Module Level 3
3-
Status: CR
4-
Date: 2020-12-22
5-
Deadline: 2021-02-22
6-
Prepare for TR: yes
3+
Status: CRD
4+
Date: 2021-07-26
5+
Deadline: 2021-08-22
76
Implementation Report: https://test.csswg.org/harness/results/css-backgrounds-3_dev/grouped/
87
Work Status: Testing
98
Shortname: css-backgrounds
109
Level: 3
1110
Group: csswg
1211
ED: https://drafts.csswg.org/css-backgrounds/
1312
TR: https://www.w3.org/TR/css-backgrounds-3/
13+
Previous Version: https://www.w3.org/TR/2020/CR-css-backgrounds-3-20201222/
1414
Previous Version: https://www.w3.org/TR/2017/CR-css-backgrounds-3-20171017/
1515
Previous version: https://www.w3.org/TR/2014/CR-css3-background-20140909/
1616
Editor: Bert Bos, W3C, bert@w3.org, w3cid 3343
@@ -3051,6 +3051,7 @@ Changes since the 22 December 2020 Candidate Recommendation Snapshot</h3>
30513051
when it doesn't generate boxes only applies to ''display: none'',
30523052
not ''display: contents''.
30533053
(<a href="https://github.com/w3c/csswg-drafts/issues/3779">Issue 3779</a>)
3054+
<li>Minor editorial improvements.
30543055
</ul>
30553056

30563057
<h3 id="changes-2017-10">

css-overflow-3/Overview.bs

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ Scrollable Overflow</h3>
206206
The <a>scrollable overflow area</a> is the union of:
207207
<ul>
208208
<li>
209-
the box’s own content and padding areas
209+
the box’s own [=padding box=]
210210

211211
<div class=issue>
212212
There's disagreement on the scrolling model.
@@ -490,14 +490,68 @@ Scrollbars and Layout</h3>
490490
For the purpose of the [=background positioning area=] and [=background painting area=], however,
491491
this reserved space is considered to be part of the [=padding box=].
492492

493+
<div class="example">
494+
In the following document fragment,
495+
both an absolutely-positioned element
496+
and a background image
497+
are positioned to the top right of the box.
498+
499+
<xmp highlight=html>
500+
<style>
501+
article { background: top right no-repeat url(circle.png); }
502+
aside { position: absolute; top: 0; right: 0; }
503+
</style>
504+
<article>
505+
<aside>×</aside>
506+
</section>
507+
</xmp>
508+
509+
If no scrollbars are present on <code>&lt;article></code>,
510+
they will both coincide in the top right padding edge corner.
511+
However, if scrollbars are present
512+
then <code>&lt;aside></code> will be completely visible,
513+
on the right padding-box edge adjacent to the scrollbars;
514+
whereas the background image will be tucked underneath the scrollbars,
515+
in the top right corner of the scrollbar-extended [=background positioning area=].
516+
</div>
517+
493518
When the box is sized to fit its contents,
494519
this reserved space is added to the size of its contents.
495520
It is otherwise subtracted from space alotted to the [=content area=].
496521
To the extent that the presence of scrollbars can affect sizing,
497522
UAs must start with the assumption that no scrollbars are needed,
498523
and recalculate sizes if it turns out they are.
499524

500-
Issue: import examples from [[CSS3-BOX]].
525+
<div class="example">
526+
In the following document fragment,
527+
the outer <code>&lt;article></code> has ''height: auto'', but ''max-height: 5em''.
528+
The inner <code>&lt;section></code> has large margins and would normally just fit:
529+
530+
<xmp highlight=html>
531+
...
532+
article { overflow: auto; max-height: 5em; width: max-content; }
533+
section { margin: 2em; line-height: 1 }
534+
...
535+
<article>
536+
<section>
537+
This section has big margins.
538+
</section>
539+
</section>
540+
</xmp>
541+
542+
If we assumed that <code>&lt;article></code> needed scrollbars,
543+
then the height of <code>&lt;section></code>,
544+
including the single line of text and twice 2em of margins,
545+
adds up to 5em plus a scrollbar.
546+
Since that is greater than 5em, the maximum allowed height,
547+
it seems we made the right assumption and d1 indeed needs scrollbars.
548+
549+
However, we should have started by assuming that no scrollbars are needed.
550+
In that case the content height of <code>&lt;article></code>
551+
is exactly the maximum height of 5em,
552+
proving that the assumption was correct
553+
and <code>&lt;article></code> indeed should not have scrollbars.
554+
</div>
501555

502556
<h3 id="scrolling-direction">
503557
Scrolling Origin, Direction, and Restriction</h3>

0 commit comments

Comments
 (0)