Skip to content

Commit 4f3a3af

Browse files
authored
[css-multicol-2] Add ::column pseudo, per WG resolution. #10715 (#11186)
1 parent 71393e5 commit 4f3a3af

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

css-multicol-2/Overview.bs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,48 @@ Stacking context</h3>
8282

8383
Issue: Add final content from previous level
8484

85+
<h3 id=column-pseudo>
86+
Styling Columns: the ''::column'' pseudo-element</h3>
87+
88+
The <dfn selector>::column</dfn> pseudo-element
89+
represents the individual columns
90+
in a [=multi-column container=].
91+
It only exists on [=multi-column containers=].
92+
93+
A [=multi-column container=] has as many ''::column'' pseudo-elements
94+
as it has columns.
95+
They cannot be individually addressed;
96+
any styles applied to a multicol's ''::column'' pseudo-elements
97+
apply to all of them on that element.
98+
Each ''::column'' has the same size and position
99+
as its corresponding column:
100+
the same size as the column's [=available space=] in the [=inline axis=]
101+
and the container's [=content box=] in the [=block axis=].
102+
(It does not cover the gaps/rules between columns.)
103+
104+
''::column'' pseudo-elements are treated as children of their [=multi-column container=],
105+
without any contents.
106+
They <em>do not</em> wrap the contents of the column,
107+
just fill the same space.
108+
109+
The ''::column'' pseudo-element accepts only a very limited set of properties:
110+
111+
* 'scroll-margin', 'scroll-snap-align', and 'scroll-snap-stop'
112+
(the scroll snap properties that apply to elements <em>inside</em> a [=scroll container=])
113+
114+
Additionally, a ''::column'' pseudo-element can have a ''::scroll-marker'' pseudo-element of its own,
115+
as ''::column::scroll-marker''.
116+
(Other pseudo-elements do not exist on ''::column''.)
117+
Such ''::scroll-marker'' pseudo-elements
118+
inherit from the ''::column'' pseudo-element's [=superior parent=],
119+
rather than the ''::column'' itself.
120+
121+
Note: This list of properties and pseudo-elements that work on ''::column''
122+
will likely be expanded in the future,
123+
as we develop more features
124+
that could usefully care about the <em>position</em> of a column
125+
without caring about the <em>contents</em>.
126+
85127
<h2 id="column-gaps-and-rules">
86128
Column gaps and rules</h2>
87129

0 commit comments

Comments
 (0)