You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-display/Overview.bs
+28-18Lines changed: 28 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -157,8 +157,8 @@ Interacting with the layout mode: the 'display-outside' property</h3>
157
157
and does not participate in any formatting context.
158
158
159
159
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,
162
162
so that the element's display type is automatically preserved
163
163
for when it's no longer suppressed.
164
164
@@ -298,12 +298,12 @@ The 'display' shorthand property</h3>
298
298
</dl>
299
299
300
300
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>
303
303
304
304
<pre class="propdef">
305
-
Name: display-box
306
-
Value: normal | none
305
+
Name: box-suppress
306
+
Value: show | discard | hide
307
307
Initial: normal
308
308
Applies to: all elements
309
309
Inherited: no
@@ -312,27 +312,35 @@ Controlling box generation: the 'display-box' property</h2>
312
312
Media: all
313
313
</pre>
314
314
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
-
318
315
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''.
320
317
Otherwise, the computed value is the specified value.
321
318
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>
324
321
<dd>
325
322
The element generates boxes as normal,
326
-
per its other 'display-*' properties.
323
+
per its 'display-*' properties.
327
324
328
-
<dt><dfn>none</dfn>
325
+
<dt><dfn>discard</dfn>
329
326
<dd>
330
327
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.
331
342
</dl>
332
343
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.?
336
344
337
345
<h2 id='run-in'>
338
346
Run-In Layout</h2>
@@ -413,4 +421,6 @@ Acknowledgments</h2>
413
421
whose last attempt with 'display-model' and 'display-role' didn't get anywhere,
414
422
but primed us for the current spec.
415
423
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