w3c / w3c/csswg-drafts

[css-sizing] Clarify contain-intrinsic-size with multicolumn/grid

Open
#7,520 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-sizing-4 Needs Edits
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

<div style="contain: size; contain-intrinsic-size: 30px; width: max-content; border: solid;
            column-count: 3; column-gap: 10px"></div>

In Blink this results in a multicol container which is 30px tall and 110px wide.

That is, contain-intrinsic-width sets the width of the columns to 30px, then 30px * 3 + 2 * 10px = 110px.

Is this correct, or should contain-intrinsic-width already include gaps and multiple columns?

It's the opposite in grid:

<div style="contain: size; contain-intrinsic-size: 30px; width: max-content; border: solid;
            display: grid; grid-template-columns: 50px 50px 50px; column-gap: 10px"></div>

Here the grid container is 30px tall and wide.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the two HTML examples in the issue and compare the contain-intrinsic-size behavior for multicolumn and grid containers. Resolve whether intrinsic size should include column gaps and multiple columns, then clarify the relevant CSS specification text and ensure the multicolumn and grid cases are consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation, web-dev
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.