Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-sizing][css-multicol][css-grid-1] taking into account gaps/gutters in Intrinsic Sizes in Multi-column and Grid Layout #163

Closed
frivoal opened this issue Jun 3, 2016 · 5 comments
Labels
Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-sizing-4

Comments

@frivoal
Copy link
Collaborator

frivoal commented Jun 3, 2016

https://drafts.csswg.org/css-sizing/#multicol-min-content says:

The min-content inline size of a multi-column element with a computed column-width of auto is the largest min-content inline-size contribution of its contents multiplied by its column-count (treating auto as 1).

Is that right? How about column-gap? Doesn't this make more sense?

The min-content inline size of a multi-column element with a computed column-width of auto is the largest min-content inline-size contribution of its contents multiplied by its column-count (treating auto as 1), plus the column-gap multiplied by column-count minus 1.

Similarly, I think

The min-content inline size of a multi-column element with a computed column-width not auto is the smaller of its column-width and the largest min-content inline-size contribution of its contents.

should be

The min-content inline size of a multi-column element with a computed column-width not auto is the smaller of its column-width and the largest min-content inline-size contribution of its contents, multiplied by by its column-count (treating auto as 1), plus the column-gap multiplied by column-count minus 1.

@frivoal
Copy link
Collaborator Author

frivoal commented Jun 3, 2016

Actually, it's the same issue in https://drafts.csswg.org/css-sizing/#multicol-max-content and https://drafts.csswg.org/css-sizing/#multicol-max-content-restrained
everytime you multiply something by the column-count, you need to add the column-gap multiplied by column-count minus 1.

@frivoal
Copy link
Collaborator Author

frivoal commented Jun 3, 2016

Similarly, I think

The min-content inline size of a multi-column element with a computed column-width not auto is the smaller of its column-width and the largest min-content inline-size contribution of its contents.

should be

The min-content inline size of a multi-column element with a computed column-width not auto is the smaller of its column-width and the largest min-content inline-size contribution of its contents, multiplied by by its column-count (treating auto as 1), plus the column-gap multiplied by column-count minus 1.

Actually, scrap that, this part is wrong. The rest still stands.

@mrego
Copy link
Member

mrego commented Jun 3, 2016

I think we've a similar issue on the Grid Layout spec:

The max-content size of a grid container is the sum of the grid container’s track sizes in the appropriate axis, when the grid is sized under a max-content constraint.

The min-content size of a grid container is the sum of the grid container’s track sizes in the appropriate axis, when the grid is sized under a min-content constraint.

I guess we should include the gutters here too.

@tabatkins
Copy link
Member

Yeah, we're missing gaps/gutters in those.

@frivoal frivoal changed the title [css-sizing][css-multicol] taking into account column-gap in min-content inline size [css-sizing][css-multicol] taking into account column-gap in Intrinsic Sizes in Multi-column Layout Jun 4, 2016
@frivoal frivoal changed the title [css-sizing][css-multicol] taking into account column-gap in Intrinsic Sizes in Multi-column Layout [css-sizing][css-multicol] taking into account gaps/gutters in Intrinsic Sizes in Multi-column and Grid Layout Jun 4, 2016
@frivoal frivoal changed the title [css-sizing][css-multicol] taking into account gaps/gutters in Intrinsic Sizes in Multi-column and Grid Layout [css-sizing][css-multicol][css-grid-1] taking into account gaps/gutters in Intrinsic Sizes in Multi-column and Grid Layout Jun 4, 2016
frivoal added a commit to frivoal/csswg-drafts that referenced this issue Jun 4, 2016
@tabatkins
Copy link
Member

Okay, so Multicol is done now, and Grid specifically defines that gutters are treated as tracks for the purposes of sizing, so we don't actually need to call out gutters specifically there.

@frivoal frivoal added Closed Accepted by Editors’ Discretion Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. and removed css-grid-1 css-multicol-1 Current Work labels May 10, 2017
birtles added a commit to birtles/csswg-drafts that referenced this issue Dec 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-sizing-4
Projects
None yet
Development

No branches or pull requests

3 participants