Skip to content

[css-gaps-1] Insets instead of outsets #12848

@kbabbitt

Description

@kbabbitt

This came up while I was working on spec changes for the resolutions we took in #12024 (comment) and #12603 (comment).

Right now, fine adjustments to gap decoration endpoints are specified as outsets. At the edges of containers, positive values protrude beyond the content edge, negative values recede from it. At interior intersections, positive values protrude into the intersection, negative values recede from it. See the examples starting here: https://www.w3.org/TR/css-gaps-1/#example-74d806b0

The reasoning for representing these as outsets fell out of the fact that column-rule-outset and row-rule-outset each took a single value. I wanted that single value to, by default, do the most commonly wanted thing for a grid: decorations flush with the content edges and continuing through intersections. I achieved that by setting the initial value to 50% and defining the percentage basis to be the crossing gap width at an intersection and 0 at the container edge. (The same examples linked previously illustrate this.)

The key assumptions underpinning that reasoning were negated by the resolutions we took in 12024 and 12603. We will now have separate properties for offsets at edges versus interior intersections, and percentages will resolve with the same basis for both. Given those changes, I think expressing these adjustments as insets rather than outsets would be more intuitive:


column-rule-break: intersection;
column-rule-inset: 0px;

column-rule-break: intersection;
column-rule-inset: 5px;

column-rule-break: intersection;
column-rule-inset: -5px;

column-rule-break: intersection;
column-rule-edge-inset: 0px;
column-rule-interior-inset: 50%;

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions