Skip to content

[css-multicol] Should column-span:all inside a transform really become a spanner? #6805

Closed

Description

@mstensho

https://drafts.csswg.org/css-multicol/#spanning-columns

In order to become a spanner, we just require that the column-span:all element otherwise participate in the formatting context established by the multicol container / columns.

#elm becomes a spanner here:

<div style="columns:2;">
  <div>
    <div id="elm" style="column-span:all;">

#elm does NOT become a spanner here:

<div style="columns:2;">
  <div style="display:flow-root;">
    <div id="elm" style="column-span:all;">

But what about this one:

<div style="columns:2;">
  <div style="transform:rotate(45deg);">
    <div id="elm" style="column-span:all;">

A transform root establishes a containing block for all descendants, according to https://drafts.csswg.org/css-transforms/#transform-rendering :

For elements whose layout is governed by the CSS box model, any value other than none for the transform property also causes the element to establish a containing block for all descendants.

It does seem strange to allow a column spanner to escape a containing block established by a transform ancestor. Yet, here's what the multicol spec says:

The containing block of the spanner is the multicol container itself. Consequently, in cases where the spanner itself does not establish a containing block for absolutely positioned boxes inside the spanner, their containing block chain skips directly to the multicol container (skipping any ancestors between the spanner and the multicol container).

Could we just change the multicol spec to require that there's nothing in the ancestry between the spanner candidate and the multicol container that establishes a containing block for fixed-positioned descendants? That would guard against transforms and filters (anything else?). Paint and layout containment are already fine, as they trigger creation of a new formatting context.

Activity

  1. self-assigned this
    on Mar 9, 2022
  2. css-meeting-bot commented on Mar 9, 2022

    @css-meeting-bot
    Member

    The CSS Working Group just discussed CSS MultiCol, and agreed to the following:

    • RESOLVED: Accept proposal that elements which establish fixedpos containing block also block descendant spanners
    The full IRC log of that discussion <fantasai> Topic: CSS MultiCol
    <fantasai> github: https://github.com//issues/6805
    <fantasai> alisonmaher: Criteria of becomming a spanner, specifically in case of a transform
    <fantasai> alisonmaher: According to spec, can become a spanner if in the same formatting context
    <fantasai> alisonmaher: even if inside a transformed ancestor
    <fantasai> alisonmaher: because transform doesn't establish a new formatting context
    <fantasai> alisonmaher:even though transforms trap fixed pos descendants
    <fantasai> alisonmaher: Proposal is that anything that establishes a fixedpos containing block also prevents descendants from becoming a spanner
    <rachelandrew> q+
    <TabAtkins> +1
    <astearns> ack rachelandrew
    <fantasai> dbaron: Sgtm
    <fantasai> rachelandrew: It seems like a sensible proposal, happy to make the edits
    <fantasai> astearns: Anyone with concerns?
    <fantasai> [silence]
    <fantasai> astearns: Any objections?
    <fantasai> RESOLVED: Accept proposal that elements which establish fixedpos containing block also block descendant spanners
  3. added a commit that references this issue on Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions