Skip to content

Commit

Permalink
[css-display] Drop in an issue explaining the status of box-suppress. <
Browse files Browse the repository at this point in the history
…#343 (comment)> per WG resolution <https://lists.w3.org/Archives/Public/www-style/2016Aug/0034.html>. Not edited in due to expectation of deferring to next level with the next publication cycle.
  • Loading branch information
fantasai committed Jan 3, 2017
1 parent a4dde50 commit 4480d6c
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions css-display/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Previous Version: https://www.w3.org/TR/2015/WD-css-display-3-20150721/
Previous Version: https://www.w3.org/TR/2014/WD-css-display-3-20140911/
Editor: Tab Atkins Jr., Google, http://xanthir.com/contact/
Editor: Elika J. Etemad / fantasai, Invited Expert, http://fantasai.inkedblade.net/contact
Abstract: This module describes how the CSS formatting box tree is generated from the document element tree and defines the 'display' and 'box-suppress' properties that control it.
Abstract: This module describes how the CSS formatting box tree is generated from the document element tree and defines the 'display' and 'display-or-not' properties that control it.
Ignored Terms: display-model, display-role, table row group box, absolutely positioned
</pre>
<pre class="link-defaults">
Expand All @@ -40,14 +40,14 @@ Introduction</h2>
(See [[!CSS3-CASCADE]].)

Then, for each element, it generates zero or more boxes
as specified by that element's 'display' and 'box-suppress' properties.
as specified by that element's 'display' and 'display-or-not' properties.
Typically, an element generates a single <a>box</a>.
However, some 'display' values
(e.g. ''display: list-item'')
generate more than one box
(e.g. a <a href="https://www.w3.org/TR/CSS2/visuren.html#principal-box">principal block box</a> and a <a href="https://www.w3.org/TR/CSS2/generate.html#lists">marker box</a>).
And some values
(such as ''display:none'', ''display: contents'', and ''box-suppress: discard'')
(such as ''display:none'', ''display: contents'', and ''display-or-not: discard'')
cause the <a>element</a> and/or its descendants to not generate any <a>boxes</a> at all.
<a>Boxes</a> are assigned the same styles as their generating <a>element</a>, unless otherwise indicated.
They're often referred to by their 'display' type--
Expand Down Expand Up @@ -479,7 +479,7 @@ Box Generation: the ''none'' and ''contents'' keywords</h3>
<dd>
The element and its descendants generates no boxes.

Advisement: It is recommended that 'box-suppress' be used instead of ''display: none'',
Advisement: It is recommended that 'display-or-not' be used instead of ''display: none'',
so that the element's display type is automatically preserved
for when it's no longer suppressed.
</dl>
Expand Down Expand Up @@ -553,16 +553,16 @@ Automatic Box Type Transformations</h3>


<h2 id='box-suppress'>
Toggling Box Generation: the 'box-suppress' property</h2>
Toggling Box Generation: the 'display-or-not' property</h2>

<pre class="propdef">
Name: box-suppress
Name: display-or-not
Value: show | discard | hide
Initial: show
Applies to: all elements
Inherited: no
Percentages: n/a
Computed value: see prose
Computed value: as specified
Media: all
</pre>

Expand All @@ -571,16 +571,21 @@ Toggling Box Generation: the 'box-suppress' property</h2>
Making this reversible requires either setting up the CSS <a>cascade</a> carefully,
or remembering what the 'display' value was before it was set to ''none''.
To make this common use-case easier,
this module introduces the separate 'box-suppress' property to do the same thing,
this module introduces the separate 'display-or-not' property to do the same thing,
so that toggling whether or not an element appears in the formatting tree
can now be done without affecting its display type when it <em>is</em> displayed.

If the computed value of 'display' is ''none'',
the computed value of 'box-suppress' is ''discard''.
Otherwise, the computed value is the specified value.
Issue: This property (which needs a better name)
along with a <css>display-type</css> (or possibly <css>display-as</css>) longhand
which takes all values of 'display' other than ''none'',
are intended to be longhands of 'display'.
This has not yet been edited in, as this split feature is likely to be deferred to the next level
in order to have time to thoroughly work through and accommodate the
<a href="https://lists.w3.org/Archives/Public/www-style/2016Aug/0025.html">various use cases</a> for showing/hiding an element.

Values have the following meanings:

<dl dfn-type="value" dfn-for="box-suppress">
<dl dfn-type="value" dfn-for="display-or-not">
<dt><dfn>show</dfn>
<dd>
The element generates boxes as normal,
Expand Down

0 comments on commit 4480d6c

Please sign in to comment.