Skip to content

Commit 7be289b

Browse files
committed
[css-display-3] Per WG resolution, migrate the 'visibility' property from CSS2.
1 parent ff384f3 commit 7be289b

File tree

1 file changed

+82
-5
lines changed

1 file changed

+82
-5
lines changed

css-display-3/Overview.bs

+82-5
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Introduction</h2>
7373
CSS takes a source document organized as
7474
a <dfn id="element-tree" oldids="css-element-tree" export for=CSS lt="element tree">tree</dfn>
7575
of <dfn id="elements" oldids="css-element" export for=CSS lt="element">elements</dfn>
76-
(which can contain a mix of other [=elements=] and [=text nodes=])
76+
(which can contain a mix of other [=CSS/elements=] and [=text nodes=])
7777
and <dfn id="text-nodes" oldids="css-text-node" export for=CSS lt="text node">text nodes</dfn>
7878
(which can contain text),
7979
and renders it onto a <a href="https://www.w3.org/TR/CSS2/intro.html#canvas">canvas</a>
@@ -1124,6 +1124,83 @@ Reordering and Accessibility</h3>
11241124
all the layout features of CSS that modify spatial relationships.
11251125

11261126

1127+
<!--
1128+
██ ██ ████ ██████ ████ ████████
1129+
██ ██ ██ ██ ██ ██ ██ ██
1130+
██ ██ ██ ██ ██ ██ ██
1131+
██ ██ ██ ██████ ██ ████████
1132+
██ ██ ██ ██ ██ ██ ██
1133+
██ ██ ██ ██ ██ ██ ██ ██
1134+
███ ████ ██████ ████ ████████
1135+
-->
1136+
1137+
<h3 id="visibility">Invisibility: the 'visibility' property</h3>
1138+
1139+
<pre class="propdef">
1140+
Name: visibility
1141+
Value: visible | hidden | collapse
1142+
Initial: visible
1143+
Applies to: all elements
1144+
Inherited: yes
1145+
Percentages: N/A
1146+
Media: visual
1147+
Computed Value: as specified
1148+
Animation type: discrete
1149+
</pre>
1150+
1151+
The 'visibility' property specifies whether the box is rendered.
1152+
[=Invisible=] boxes still affect layout.
1153+
(Set the 'display' property to ''display/none'' to suppress box generation altogether.).
1154+
Values have the following meanings:
1155+
1156+
<dl dfn-for=visibility dfn-type=value>
1157+
<dt><dfn>visible</dfn>
1158+
<dd>
1159+
The generated box is visible, as normal.
1160+
<dt><dfn>hidden</dfn>
1161+
<dd>
1162+
Any boxes generated by the element are [=invisible=].
1163+
Descendants of the element can, however, be visible
1164+
if they have ''visibility: visible''.
1165+
<dt><dfn>collapse</dfn>
1166+
<dd>
1167+
Indicates that the box is <dfn dfn for noexport>collapsed</dfn>,
1168+
which can cause it to take up less space than otherwise
1169+
in a formatting-context&ndash;specific way.
1170+
See <a href="https://www.w3.org/TR/CSS2/tables.html#dynamic-effects">dynamic row and column effects in tables</a> [[!CSS2]]
1171+
and [[css-flexbox-1#visibility-collapse|collapsed flex items]] in flex layout [[!CSS-FLEXBOX-1]].
1172+
In all other cases, however,
1173+
(i.e. unless otherwise specified)
1174+
this simply makes the box [=invisible=],
1175+
just like ''visibility/hidden''.
1176+
</dl>
1177+
1178+
Note: For certain constructs with strict hierarchical structure
1179+
such as tables
1180+
making parent elements with special roles (such as table rows) [=invisible=]
1181+
while leaving child elements with special roles (such as table cells) visible
1182+
can be problematic for accessibility tools.
1183+
Authors should avoid creating these situations.
1184+
1185+
<dfn>Invisible</dfn> boxes are not rendered
1186+
(as if they were fully transparent),
1187+
cannot be interacted with
1188+
(and behave as if they had ''pointer-events: none''),
1189+
are removed from navigation
1190+
(similar to ''display: none''),
1191+
and are also not rendered to speech
1192+
(except when 'speak' is ''speak/always'' [[CSS-SPEECH-1]]).
1193+
However, as with ''display: contents'',
1194+
their semantic role as a container is not affected,
1195+
to ensure that any ''visibility/visible'' descendants
1196+
are properly interpreted.
1197+
1198+
Note: If 'speak' is ''speak/always'',
1199+
an otherwise [=invisible=] box
1200+
<em>is</em> rendered to speech,
1201+
and may be interacted with using non-visual/spatial methods.
1202+
1203+
11271204
<!--
11281205
████████ ██ ██ ██ ██ ████ ██ ██
11291206
██ ██ ██ ██ ███ ██ ██ ███ ██
@@ -1769,13 +1846,13 @@ Acknowledgments</h2>
17691846
-->
17701847

17711848
<!--
1772-
██████ ██ ██ ███ ██ ██ ██████ ████████ ██████
1849+
██████ ██ ██ ███ ██ ██ ██████ ████████ ██████
17731850
██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██ ██
1774-
██ ██ ██ ██ ██ ████ ██ ██ ██ ██
1775-
██ █████████ ██ ██ ██ ██ ██ ██ ████ ██████ ██████
1851+
██ ██ ██ ██ ██ ████ ██ ██ ██ ██
1852+
██ █████████ ██ ██ ██ ██ ██ ██ ████ ██████ ██████
17761853
██ ██ ██ █████████ ██ ████ ██ ██ ██ ██
17771854
██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██
1778-
██████ ██ ██ ██ ██ ██ ██ ██████ ████████ ██████
1855+
██████ ██ ██ ██ ██ ██ ██ ██████ ████████ ██████
17791856
-->
17801857

17811858
<h2 class=no-num id="changes">

0 commit comments

Comments
 (0)