Skip to content

Commit 6330db2

Browse files
committed
[css-display] Switch display-box to box-suppress, per proposal from fantasai and me.:
1 parent 54e8d5a commit 6330db2

2 files changed

Lines changed: 207 additions & 184 deletions

File tree

css-display/Overview.bs

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ Interacting with the layout mode: the 'display-outside' property</h3>
157157
and does not participate in any formatting context.
158158

159159
Note: This value exists for legacy reasons,
160-
and interacts with the separate 'display-box' property.
161-
It is recommended that 'display-box' be used to suppress an element,
160+
and interacts with the separate 'box-suppress' property.
161+
It is recommended that 'box-suppress' be used to suppress an element,
162162
so that the element's display type is automatically preserved
163163
for when it's no longer suppressed.
164164

@@ -298,12 +298,12 @@ The 'display' shorthand property</h3>
298298
</dl>
299299

300300

301-
<h2 id='the-display-box'>
302-
Controlling box generation: the 'display-box' property</h2>
301+
<h2 id='box-suppress'>
302+
Controlling box generation: the 'box-suppress' property</h2>
303303

304304
<pre class="propdef">
305-
Name: display-box
306-
Value: normal | none
305+
Name: box-suppress
306+
Value: show | discard | hide
307307
Initial: normal
308308
Applies to: all elements
309309
Inherited: no
@@ -312,27 +312,35 @@ Controlling box generation: the 'display-box' property</h2>
312312
Media: all
313313
</pre>
314314

315-
The 'display-box' property is not part of the 'display' shorthand,
316-
so that 'display' can be safely set without accidentally overriding whether an element is being suppressed or not.
317-
318315
If the computed value of 'display-outside' is ''display-outside/none'',
319-
the computed value of 'display-box' is ''display-box/none''.
316+
the computed value of 'box-suppress' is ''discard''.
320317
Otherwise, the computed value is the specified value.
321318

322-
<dl dfn-type="value" dfn-for="box">
323-
<dt><dfn>normal</dfn>
319+
<dl dfn-type="value" dfn-for="box-suppress">
320+
<dt><dfn>show</dfn>
324321
<dd>
325322
The element generates boxes as normal,
326-
per its other 'display-*' properties.
323+
per its 'display-*' properties.
327324

328-
<dt><dfn>none</dfn>
325+
<dt><dfn>discard</dfn>
329326
<dd>
330327
The element generates no boxes at all.
328+
329+
<dt><dfn>hide</dfn>
330+
<dd>
331+
The element generates boxes as normal,
332+
but those boxes do not participate in layout in any way,
333+
and must not be displayed.
334+
335+
For the purpose of any layout-related information,
336+
such as querying for the computed value of the element's 'width' property,
337+
it must be treated as if it did not generate any boxes.
338+
339+
Properties that rely on boxes but do not rely on layout,
340+
such as animations, 'counter-increment', etc.,
341+
must work as normal on this element and its descendants.
331342
</dl>
332343

333-
<p class='issue'>
334-
Is there a need for a value that suppresses box generation for layout purposes,
335-
but still generates them for the purposes of animations/counters/etc.?
336344

337345
<h2 id='run-in'>
338346
Run-In Layout</h2>
@@ -413,4 +421,6 @@ Acknowledgments</h2>
413421
whose last attempt with 'display-model' and 'display-role' didn't get anywhere,
414422
but primed us for the current spec.
415423

416-
We would also like to thank the many JavaScript libraries such as jQuery which have hacked around the "what 'display' should I give it when you call .show()?" problem, making it extremely clear that something needed to be done on our part.
424+
We would also like to thank the many JavaScript libraries such as jQuery
425+
which have hacked around the "what 'display' should I give it when you call .show()?" problem,
426+
making it extremely clear that something needed to be done on our part.

0 commit comments

Comments
 (0)