Skip to content

Commit

Permalink
[css-multicol-2] Add ::column pseudo, per WG resolution. #10715 (#11186)
Browse files Browse the repository at this point in the history
  • Loading branch information
tabatkins authored Nov 15, 2024
1 parent 71393e5 commit 4f3a3af
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions css-multicol-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,48 @@ Stacking context</h3>

Issue: Add final content from previous level

<h3 id=column-pseudo>
Styling Columns: the ''::column'' pseudo-element</h3>

The <dfn selector>::column</dfn> pseudo-element
represents the individual columns
in a [=multi-column container=].
It only exists on [=multi-column containers=].

A [=multi-column container=] has as many ''::column'' pseudo-elements
as it has columns.
They cannot be individually addressed;
any styles applied to a multicol's ''::column'' pseudo-elements
apply to all of them on that element.
Each ''::column'' has the same size and position
as its corresponding column:
the same size as the column's [=available space=] in the [=inline axis=]
and the container's [=content box=] in the [=block axis=].
(It does not cover the gaps/rules between columns.)

''::column'' pseudo-elements are treated as children of their [=multi-column container=],
without any contents.
They <em>do not</em> wrap the contents of the column,
just fill the same space.

The ''::column'' pseudo-element accepts only a very limited set of properties:

* 'scroll-margin', 'scroll-snap-align', and 'scroll-snap-stop'
(the scroll snap properties that apply to elements <em>inside</em> a [=scroll container=])

Additionally, a ''::column'' pseudo-element can have a ''::scroll-marker'' pseudo-element of its own,
as ''::column::scroll-marker''.
(Other pseudo-elements do not exist on ''::column''.)
Such ''::scroll-marker'' pseudo-elements
inherit from the ''::column'' pseudo-element's [=superior parent=],
rather than the ''::column'' itself.

Note: This list of properties and pseudo-elements that work on ''::column''
will likely be expanded in the future,
as we develop more features
that could usefully care about the <em>position</em> of a column
without caring about the <em>contents</em>.

<h2 id="column-gaps-and-rules">
Column gaps and rules</h2>

Expand Down

0 comments on commit 4f3a3af

Please sign in to comment.