Skip to content

Commit 52346ab

Browse files
committed
[css-overflow-3][css-backgrounds-3][css-writing-modes] Don't propagate from 'display: none' elements. Do propagate from 'display: contents' elements. #3779
1 parent 3be42a5 commit 52346ab

File tree

4 files changed

+40
-138
lines changed

4 files changed

+40
-138
lines changed

css-backgrounds-3/Overview.bs

+13-8
Original file line numberDiff line numberDiff line change
@@ -1260,14 +1260,9 @@ in order to allow styling of the canvas
12601260
CSS propagates the background of the root element
12611261
(or, in the case of HTML, the <body> element)
12621262
as described below.
1263-
However, if no boxes are generated for the element whose background
1264-
would be used for the canvas
1265-
(for example, if the root element has ''display: none''),
1266-
then the canvas background is transparent.
1267-
1268-
<p class=note>Note that an element might be invisible, but still generate boxes.
1269-
For example, if the element has ''visibility: hidden'' but not ''display: none'',
1270-
boxes <em>are</em> generated for it and its background <em>is</em> used for the canvas.
1263+
However, the element whose background would be used for the canvas
1264+
is ''display: none'',
1265+
then the [=canvas background=] is transparent.
12711266

12721267
<p>If the [=canvas background=] is not opaque,
12731268
the <dfn export>canvas surface</dfn> below it shows through.
@@ -3040,6 +3035,16 @@ The lists below describe which features from this specification are in each leve
30403035
<h2 id="changes">
30413036
Changes</h2>
30423037

3038+
<h3 id="changes-2020-12">
3039+
Changes since the 22 December 2020 Candidate Recommendation Snapshot</h3>
3040+
3041+
<ul>
3042+
<li>Clarified that the rule about not propagating backgrounds from the root
3043+
when it doesn't generate boxes only applies to ''display: none'',
3044+
not ''display: contents''.
3045+
(<a href="https://github.com/w3c/csswg-drafts/issues/3779">Issue 3779</a>)
3046+
</ul>
3047+
30433048
<h3 id="changes-2017-10">
30443049
Changes since the 17 October 2017 Candidate Recommendation</h3>
30453050

css-overflow-3/Overview.bs

+4-7
Original file line numberDiff line numberDiff line change
@@ -555,22 +555,19 @@ Expanding Clipping Bounds: the 'overflow-clip-margin' property</h3>
555555
Overflow Viewport Propagation</h3>
556556

557557
UAs must apply the 'overflow-*' values
558-
set on the root element to the <a>viewport</a>.
558+
set on the root element to the <a>viewport</a>
559+
when the root element’s 'display' value is not ''none''.
559560
However,
560561
when the root element is an [[!HTML]] <{html}> element
561562
(including <a href="https://html.spec.whatwg.org/multipage/introduction.html#html-vs-xhtml">XML syntax for HTML</a>)
562563
whose 'overflow' value is ''overflow/visible'' (in both axes),
563-
and that element has a <{body}> element as a child,
564+
and that element has as a child
565+
a <{body}> element whose 'display' value is also not ''none'',
564566
user agents must instead apply the 'overflow-*' values
565567
of the first such child element to the viewport.
566568
The element from which the value is propagated must then have
567569
a used 'overflow' value of ''overflow/visible''.
568570

569-
The overflow values are not propagated to the viewport if no boxes are
570-
generated for the element whose overflow values
571-
would be used for the viewport (for example, if the root element has
572-
display: none).
573-
574571
If ''overflow/visible'' is applied to the viewport,
575572
it must be interpreted as ''overflow/auto''.
576573
If ''overflow/clip'' is applied to the viewport,

css-writing-modes-3/Overview.bs

+16-122
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ Work Status: Testing
88
Group: csswg
99
ED: https://drafts.csswg.org/css-writing-modes-3/
1010
TR: https://www.w3.org/TR/css-writing-modes-3/
11-
Previous Version: https://www.w3.org/TR/2019/PR-css-writing-modes-3-20191024/
12-
Previous Version: https://www.w3.org/TR/2019/CR-css-writing-modes-3-20190903/
13-
Previous Version: https://www.w3.org/TR/2019/CR-css-writing-modes-3-20190730/
14-
Previous Version: https://www.w3.org/TR/2018/CR-css-writing-modes-3-20180524/
15-
Previous Version: https://www.w3.org/TR/2017/CR-css-writing-modes-3-20171207/
16-
Previous Version: https://www.w3.org/TR/2015/CR-css-writing-modes-3-20151215/
11+
Previous Version: https://www.w3.org/TR/2019/REC-css-writing-modes-3-20191210/
1712
Issue Tracking: Tracker http://www.w3.org/Style/CSS/Tracker/products/30
1813
Editor: Elika J. Etemad / fantasai, Invited Expert, http://fantasai.inkedblade.net/contact, w3cid 35400
1914
Editor: Koji Ishii, Google, kojiishi@gmail.com, w3cid 45369
@@ -23,6 +18,7 @@ Former Editor: Michel Suignard, Microsoft, michelsu@microsoft.com
2318
Abstract: CSS Writing Modes Level 3 defines CSS support for various writing modes and their combinations, including left-to-right and right-to-left text ordering as well as horizontal and vertical orientations.
2419
Ignored Terms: glyph orientation, *-left, *-right, *-top, *-bottom, text-combine-mode, root inline box, … message topic …, glyph-orientation-horizontal
2520
Link Defaults: css2 (property) display/min-height/max-height/min-width/max-width/clip/left/right/bottom/top, css-text-3 (property) letter-spacing, css-text-decor-3 (property) text-decoration, svg2 (property) glyph-orientation-vertical/glyph-orientation-horizontal
21+
Status Text: <div class=correction><a href="https://www.w3.org/Consortium/Process/#candidate-correction">Candidate corrections</a> are marked in the document.</div>
2622
</pre>
2723
<pre class=link-defaults>
2824
spec:css2; type:property; text:float
@@ -2265,7 +2261,8 @@ The Principal Writing Mode</h2>
22652261
and the default <a>page progression</a> direction.
22662262

22672263
<p>As a special case for handling HTML documents,
2268-
if the root element has a <{body}> child element [[!HTML]],
2264+
if the root element has a <{body}> child element [[!HTML]]
2265+
<ins cite="#correction-display-none-propagation">whose 'display' value is not ''none''</ins>,
22692266
the [=used value=] of the of 'writing-mode' and 'direction' properties on root element
22702267
are taken
22712268
from the [=computed value|computed=] 'writing-mode' and 'direction'
@@ -2274,6 +2271,14 @@ The Principal Writing Mode</h2>
22742271
Note that this does not affect the computed values of 'writing-mode', 'direction', or 'text-orientation'
22752272
of the root element itself.
22762273

2274+
<div class=correction id=correction-display-none-propagation>
2275+
<span class=marker>Candidate Correction 1:</span>
2276+
Specify that the <{body}> element is ignored for determining the [=principal writing mode=]
2277+
if it has ''display: none''.
2278+
<a href="https://github.com/w3c/csswg-drafts/issues/3779">Issue 3779</a>
2279+
<!-- Say that we have tests for this and point to them once we have tests for this. -->
2280+
</div>
2281+
22772282
Note: Propagation is done on used values rather than computed values
22782283
to avoid disrupting other aspects of style computation,
22792284
such as [=inheritance=],
@@ -2507,130 +2512,19 @@ Privacy and Security Considerations {#priv-sec}
25072512

25082513
<h2 class="no-num" id="changes">Changes</h2>
25092514

2515+
See also <a href="https://www.w3.org/TR/2019/REC-css-writing-modes-3-20191210/#changes">list of changes during Candidate Recommendation</a>.
2516+
25102517
<h3 class="no-num" id="changes-2019">
25112518
Changes since the <a href="https://www.w3.org/TR/2019/REC-css-writing-modes-3-20191210/">December
25122519
2019 CSS Writing Modes Module Level 4 Recommendation</a></h3>
25132520

25142521
<ul class="informative">
2522+
<li>Specified that a ''display: none'' <{body}> element does not influence the [=principal writing mode=].
2523+
(<a href="https://github.com/w3c/csswg-drafts/issues/3779">Issue 3779</a>)
25152524
<li>Updated “Applies to” line for 'text-combine-upright' to mention text
25162525
(since certain effects like ''display: contents'' can strip the box itself).
25172526
</ul>
25182527

2519-
<h3 class="no-num" id="changes-20190903">
2520-
Changes since the <a href="https://www.w3.org/TR/2019/CR-css-writing-modes-3-20190903">September
2521-
2019 CSS Writing Modes Module Level 3 Candidate Recommendation</a></h3>
2522-
2523-
<ul>
2524-
<li>Clarified that the [=central baseline=] is the [=ideographic central baseline=].
2525-
(<a href="https://github.com/w3c/csswg-drafts/issues/5177">Issue 5177</a>)
2526-
</ul>
2527-
2528-
<h3 class="no-num" id="changes-20190903">
2529-
Changes since the <a href="https://www.w3.org/TR/2019/CR-css-writing-modes-3-20190903">September
2530-
2019 CSS Writing Modes Module Level 3 Candidate Recommendation</a></h3>
2531-
2532-
No substantive change;
2533-
minor editorial fixes
2534-
(see issue <a href="https://github.com/w3c/csswg-drafts/issues/4293">4293</a>,
2535-
<a href="https://github.com/w3c/csswg-drafts/issues/4272">4272</a>,
2536-
and <a href="https://github.com/w3c/csswg-drafts/issues/4273">4273</a>).
2537-
2538-
<h3 class="no-num" id="changes-20190730">
2539-
Changes since the <a href="https://www.w3.org/TR/2019/CR-css-writing-modes-3-20190730/">July
2540-
2019 CSS Writing Modes Module Level 3 Candidate Recommendation</a></h3>
2541-
2542-
<ul>
2543-
<li>Added back accidentally-dropped rules for sizing [=orthogonal flows=].
2544-
Updated wording to use current [[css-sizing-3]] terminology.
2545-
(<a href="https://github.com/w3c/csswg-drafts/issues/4220">Issue 4220</a>)
2546-
</ul>
2547-
2548-
<h3 class="no-num" id="changes-201805">
2549-
Changes since the <a href="https://www.w3.org/TR/2018/CR-css-writing-modes-3-20180524/">May
2550-
2018 CSS Writing Modes Module Level 3 Candidate Recommendation</a></h3>
2551-
2552-
<ul>
2553-
<li>Clarified that propagation of the principal writing mode from the body element
2554-
to the initial containing block and viewport
2555-
does affect the used value on root element as well,
2556-
but not its computed value.
2557-
Also, optionally allow propagating 'text-orientation' as well.
2558-
(<a href="https://github.com/w3c/csswg-drafts/issues/3066">Issue 3066</a>)
2559-
<li>Make the processing of white space
2560-
in a 'text-combine-upright' combined text sequence
2561-
explicitly undefined in this level
2562-
(<a href="https://github.com/w3c/csswg-drafts/issues/4139">Issue 4139</a>)
2563-
<blockquote>
2564-
<p>When combining text as for ''text-combine-upright: all'',
2565-
the glyphs of the combined text are <a>bidi-isolated</a>
2566-
and composed horizontally
2567-
(ignoring 'letter-spacing' and any forced line breaks,
2568-
but using the specified font settings),
2569-
similar to the contents of an ''inline-block'' box
2570-
with a [=horizontal writing mode=] and a 'line-height' of ''1em''.
2571-
<ins>Processing of [=document white space=] included in the combined text
2572-
is not defined in this level.</ins>
2573-
</blockquote>
2574-
</ul>
2575-
2576-
<h3 class="no-num" id="changes-201712">
2577-
Changes since the <a href="https://www.w3.org/TR/2017/CR-css-writing-modes-3-20171207/">December
2578-
2017 CSS Writing Modes Module Level 3 Candidate Recommendation</a></h3>
2579-
2580-
<ul>
2581-
<li>Fixed the fallback “available space” for orthogonal flows
2582-
to handle 'max-height' (and 'min-height') which it forgot to consider.
2583-
(<a href="https://github.com/w3c/csswg-drafts/issues/2239">Issue 2239</a>)
2584-
</ul>
2585-
2586-
<h3 class="no-num" id="changes-201512">
2587-
Changes since the <a href="http://www.w3.org/TR/2015/CR-css-writing-modes-3-20151215/">December
2588-
2015 CSS Writing Modes Module Level 3 Candidate Recommendation</a></h3>
2589-
2590-
<ul>
2591-
<li>Deferred the ''sideways-lr'' and ''sideways-rl'' values of 'writing-mode' to Level 4.
2592-
<li>Deferred the ''digits'' value of 'text-combine-upright' to Level 4.
2593-
<li>Deferred the automatic multi-column behavior of orthogonal flows to Level 4.
2594-
<li>Changed the fallback “available space” for orthogonal flows
2595-
to use the nearest fixed-size <a>scrollport</a> where available.
2596-
(<a href="https://github.com/w3c/csswg-drafts/issues/1391">Issue 1391</a>)
2597-
<li>Added Privacy and Security Considerations section.
2598-
<li>Miscellaneous editorial clarifications.
2599-
</ul>
2600-
2601-
A <a href="https://drafts.csswg.org/css-writing-modes-3/issues-cr-2015">Disposition of Comments</a> is available.
2602-
2603-
<h3 class="no-num" id="changes-201311">
2604-
Changes since the <a href="https://www.w3.org/TR/2014/CR-css-writing-modes-3-20140320/">March
2605-
2014 CSS Writing Modes Module Level 3 Candidate Recommendation</a></h3>
2606-
2607-
<ul>
2608-
<li>Fixed orthogonal flows auto-sizing rules to better handle shrink-wrapping.
2609-
<li>Removed ''sideways-left'' and ''sideways-right'' value of 'text-orientation',
2610-
redefined ''sideways'' to behave as ''sideways-right'',
2611-
and added ''sideways-lr'' and ''sideways-rl'' values to 'writing-mode' for usage with non-vertical writing systems.
2612-
(See <a href="http://www.w3.org/mid/55982414.1080905@inkedblade.net">discussion</a>.)
2613-
<li>Removed ''use-glyph-orientation'' value of 'text-orientation' and defined 'glyph-orientation-vertical' as an alias of 'text-orientation'
2614-
consistent with how CSS aliases are handled (see 'page-break-inside' for an example).
2615-
<li>
2616-
Added handling of degrees as integers in 'glyph-orientation-vertical',
2617-
as required for SVG backwards-compatibility.
2618-
<li>
2619-
Removed statements about ''run-in'' boxes, since this value was removed from CSS2.1 and has a substantially different model in CSS Display Level 3.
2620-
Replaced with a generalized statement about all display types, using new [[!CSS-DISPLAY-3]] terminology.
2621-
<li>
2622-
Changed to <a href="#principal-writing-mode">propagate the computed values</a> of the 'writing-mode' and the 'direction' property
2623-
from body child element to the initial containing block.
2624-
<li>
2625-
Changed the 'caption-side' property to <a href="#logical-direction-layout">flow-relative mappings</a>.
2626-
<li>
2627-
Specified that SVG 'writing-mode' values compute through to new equivalents.
2628-
<li>
2629-
Specified that 'writing-mode' does not apply to <a>ruby base containers</a> and <a>ruby annotation containers</a>
2630-
<li>
2631-
Made several editorial improvements and marked some features <a href="#status">at risk</a>.
2632-
</ul>
2633-
26342528
<h2 class="no-num" id="acknowledgements">
26352529
Acknowledgements</h2>
26362530

css-writing-modes-4/Overview.bs

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Work Status: Testing
88
Group: csswg
99
ED: https://drafts.csswg.org/css-writing-modes-4/
1010
TR: https://www.w3.org/TR/css-writing-modes-4/
11+
Previous Version: https://www.w3.org/TR/2019/CR-css-writing-modes-4-20190730/
1112
Previous Version: https://www.w3.org/TR/2018/CR-css-writing-modes-4-20180524/
1213
Issue Tracking: Tracker http://www.w3.org/Style/CSS/Tracker/products/30
1314
Editor: Elika J. Etemad / fantasai, Invited Expert, http://fantasai.inkedblade.net/contact, w3cid 35400
@@ -2468,7 +2469,8 @@ The Principal Writing Mode</h2>
24682469
and the default <a>page progression</a> direction.
24692470

24702471
<p>As a special case for handling HTML documents,
2471-
if the root element has a <{body}> child element [[!HTML]],
2472+
if the root element has a <{body}> child element [[!HTML]]
2473+
whose 'display' value is not ''none'',
24722474
the [=used value=] of the of 'writing-mode' and 'direction' properties on root element
24732475
are taken
24742476
from the [=computed value|computed=] 'writing-mode' and 'direction'
@@ -2793,6 +2795,10 @@ Changes since the <a href="https://www.w3.org/TR/2019/CR-css-writing-modes-4-201
27932795
2019 CSS Writing Modes Module Level 4 Candidate Recommendation</a></h3>
27942796

27952797
<ul>
2798+
<li>Specified that a ''display: none'' <{body}> element does not influence the [=principal writing mode=].
2799+
(<a href="https://github.com/w3c/csswg-drafts/issues/3779">Issue 3779</a>)
2800+
<li>Updated “Applies to” line for 'text-combine-upright' to mention text
2801+
(since certain effects like ''display: contents'' can strip the box itself).
27962802
<li>
27972803
Clarified that the [=central baseline=] is the [=ideographic central baseline=].
27982804
(<a href="https://github.com/w3c/csswg-drafts/issues/5177">Issue 5177</a>)

0 commit comments

Comments
 (0)