CSS Multi-column Layout Module Level 2

Editor’s Draft,

Specification Metadata
This version:
https://drafts.csswg.org/css-multicol-2/
Issue Tracking:
Inline In Spec
GitHub Issues
Editor:
Florian Rivoal (On behalf of Bloomberg)

Abstract

This specification describes multi-column layouts in CSS, a style sheet language for the web. Using functionality described in the specification, content can be flowed into multiple columns with a gap and a rule between them.

This is a delta specification over CSS Multi-column Level 1. Once the level 1 specification is final, its content will be integrated into this specification, which will then replace it. Until then, CSS Multi-column Level 2 only contains additions and extensions to level 1

CSS is a language for describing the rendering of structured documents (such as HTML and XML) on screen, on paper, in speech, etc.

Status of this document

This is a public copy of the editors’ draft. It is provided for discussion only and may change at any moment. Its publication here does not imply endorsement of its contents by W3C. Don’t cite this document other than as work in progress.

GitHub Issues are preferred for discussion of this specification. When filing an issue, please put the text “css-multicol” in the title, preferably like this: “[css-multicol] …summary of comment…”. All issues and comments are archived, and there is also a historical archive.

This document was produced by the CSS Working Group (part of the Style Activity).

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

This document is governed by the 1 March 2017 W3C Process Document.

1. Introduction

Add final content from previous level

2. Module Interactions

This document defines new features not present in earlier specifications. In addition, once final, it will replace and supersede the following:

3. The multi-column model

Add final content from previous level

4. The number and width of columns

Add final content from previous level

4.1. column-width

Add final content from previous level

4.2. column-count

Add final content from previous level

4.3. columns

Add final content from previous level

4.4. Pseudo-algorithm

Add final content from previous level

4.5. Stacking context

Add final content from previous level

5. Column gaps and rules

Add final content from previous level

5.1. column-gap

Add final content from previous level

5.2. column-rule-color

Add final content from previous level

5.3. column-rule-style

Add final content from previous level

5.4. column-rule-width

Add final content from previous level

5.5. column-rule

Add final content from previous level

6. Column breaks

The previous level of this specification defined how the user agent must determine where column breaks are placed when content is laid out in multiple columns. The [CSS3-BREAK] module has since been introduced to define how to break the content across pages, columns, or CSS Regions, and supersedes the column break section of [CSS3-MULTICOL].

This specification defers to [CSS3-BREAK] on this topic.

6.1. break-before, break-after, break-inside

The break-before, break-after and break-inside properties are now defined in [CSS3-BREAK].

7. Spanning columns

The column-span property makes it possible for an element to span across several columns. This specification adds <integer> to the values available in the previous level.

7.1. column-span

Name: column-span
Value: none | <integer> | all | auto
Initial: none
Applies to: in-flow block-level elements
Inherited: no
Percentages: N/A
Media: visual
Computed value: specified value
Canonical order: per grammar
Animation type: discrete

This property describes how many columns an element spans across. Values are:

none
all

Add final content from previous level

<integer>
The element spans the specified number of columns. Values must be greater than 0. If the specified integer value is equal to, or larger than the number of columns in the multicol element, the number of columns spanned will be the same as if column-span: all had been specified.
This definition is insufficent.
  • Does column-span: 1 count as column-span: none, or does it create a spanner (which is a BFC)?
  • Which columns does it span?
  • How does that affect height calculations, and interract with column-fill
auto
The number of columns spanned by the element depends on its min-content outer size in the inline direction of the multi-column element. If it is smaller than the used value of column-width, this is the same as if column-span: none had been specified. Otherwise, the number of columns spanned is the smallest positive integer n for which n × column-width + (n - 1) × column-gap is larger than the min-content outer size. If this would be larger than the number of columns, the number of columns spanned will be the same as if column-span: all had been specified.

If column-span: 1 does not do the same as column-span: none, should this behave as column-span: 1 or as column-span: none when the element is small enough?

Add final content from previous level possibly with adjustements to account for <integer> values

8. Filling columns

Add final content from previous level

8.1. column-fill

Add final content from previous level

9. Overflow

9.1. Overflow inside multicol elements

Add final content from previous level

9.2. Pagination and overflow outside multicol elements

Add final content from previous level

Acknowledgments

This document builds upon Håkon Wium Lie’s work in [CSS3-MULTICOL], and is based on several older proposals and comments on older proposals. Contributors include:

Add final level 1 contributor list

Privacy and Security Considerations

Delta spec lol

Conformance

Document conventions

Conformance requirements are expressed with a combination of descriptive assertions and RFC 2119 terminology. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this document are to be interpreted as described in RFC 2119. However, for readability, these words do not appear in all uppercase letters in this specification.

All of the text of this specification is normative except sections explicitly marked as non-normative, examples, and notes. [RFC2119]

Examples in this specification are introduced with the words “for example” or are set apart from the normative text with class="example", like this:

This is an example of an informative example.

Informative notes begin with the word “Note” and are set apart from the normative text with class="note", like this:

Note, this is an informative note.

Advisements are normative sections styled to evoke special attention and are set apart from other normative text with <strong class="advisement">, like this: UAs MUST provide an accessible alternative.

Conformance classes

Conformance to this specification is defined for three conformance classes:

style sheet
A CSS style sheet.
renderer
A UA that interprets the semantics of a style sheet and renders documents that use them.
authoring tool
A UA that writes a style sheet.

A style sheet is conformant to this specification if all of its statements that use syntax defined in this module are valid according to the generic CSS grammar and the individual grammars of each feature defined in this module.

A renderer is conformant to this specification if, in addition to interpreting the style sheet as defined by the appropriate specifications, it supports all the features defined by this specification by parsing them correctly and rendering the document accordingly. However, the inability of a UA to correctly render a document due to limitations of the device does not make the UA non-conformant. (For example, a UA is not required to render color on a monochrome monitor.)

An authoring tool is conformant to this specification if it writes style sheets that are syntactically correct according to the generic CSS grammar and the individual grammars of each feature in this module, and meet all other conformance requirements of style sheets as described in this module.

Requirements for Responsible Implementation of CSS

The following sections define several conformance requirements for implementing CSS responsibly, in a way that promotes interoperability in the present and future.

Partial Implementations

So that authors can exploit the forward-compatible parsing rules to assign fallback values, CSS renderers must treat as invalid (and ignore as appropriate) any at-rules, properties, property values, keywords, and other syntactic constructs for which they have no usable level of support. In particular, user agents must not selectively ignore unsupported property values and honor supported values in a single multi-value property declaration: if any value is considered invalid (as unsupported values must be), CSS requires that the entire declaration be ignored.

Implementations of Unstable and Proprietary Features

To avoid clashes with future stable CSS features, the CSSWG recommends following best practices for the implementation of unstable features and proprietary extensions to CSS.

Implementations of CR-level Features

Once a specification reaches the Candidate Recommendation stage, implementers should release an unprefixed implementation of any CR-level feature they can demonstrate to be correctly implemented according to spec, and should avoid exposing a prefixed variant of that feature.

To establish and maintain the interoperability of CSS across implementations, the CSS Working Group requests that non-experimental CSS renderers submit an implementation report (and, if necessary, the testcases used for that implementation report) to the W3C before releasing an unprefixed implementation of any CSS features. Testcases submitted to W3C are subject to review and correction by the CSS Working Group.

Further information on submitting testcases and implementation reports can be found from on the CSS Working Group’s website at http://www.w3.org/Style/CSS/Test/. Questions should be directed to the public-css-testsuite@w3.org mailing list.

Index

Terms defined by this specification

Terms defined by reference

References

Normative References

[CSS-ALIGN-3]
Elika Etemad; Tab Atkins Jr.. CSS Box Alignment Module Level 3. URL: https://www.w3.org/TR/css-align-3/
[CSS-REGIONS-1]
Rossen Atanassov; Alan Stearns. CSS Regions Module Level 1. URL: https://www.w3.org/TR/css-regions-1/
[CSS-SIZING-3]
Elika Etemad. CSS Intrinsic & Extrinsic Sizing Module Level 3. URL: https://www.w3.org/TR/css-sizing-3/
[CSS-VALUES-3]
Tab Atkins Jr.; Elika Etemad. CSS Values and Units Module Level 3. URL: https://www.w3.org/TR/css-values-3/
[CSS3-BREAK]
Rossen Atanassov; Elika Etemad. CSS Fragmentation Module Level 3. URL: https://www.w3.org/TR/css-break-3/
[RFC2119]
S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. March 1997. Best Current Practice. URL: https://tools.ietf.org/html/rfc2119

Informative References

[CSS3-MULTICOL]
Håkon Wium Lie. CSS Multi-column Layout Module. 12 April 2011. CR. URL: https://www.w3.org/TR/css3-multicol

Property Index

Name Value Initial Applies to Inh. %ages Media Anim­ation type Canonical order Com­puted value
column-span none | <integer> | all | auto none in-flow block-level elements no N/A visual discrete per grammar specified value

Issues Index

Add final content from previous level
Add final content from previous level
Add final content from previous level
Add final content from previous level
Add final content from previous level
Add final content from previous level
Add final content from previous level
Add final content from previous level
Add final content from previous level
Add final content from previous level
Add final content from previous level
Add final content from previous level
Add final content from previous level
Add final content from previous level
Add final content from previous level
This definition is insufficent.
If column-span: 1 does not do the same as column-span: none, should this behave as column-span: 1 or as column-span: none when the element is small enough?
Add final content from previous level possibly with adjustements to account for <integer> values
Add final content from previous level
Add final content from previous level
Add final content from previous level
Add final content from previous level
Add final level 1 contributor list