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-multicol] What happens to the mbp of the empty fragment created by a spanner being first-child of an element #2552

Closed
rachelandrew opened this issue Apr 12, 2018 · 3 comments
Assignees
Labels
css-multicol-1 Current Work

Comments

@rachelandrew
Copy link
Contributor

In working on #1072 I built some tests and noticed something which seems suboptimal.

Where the spanner is the first child of an element with margin, padding and borders implementations then split those across the columns. I have a test case here and below is a screenshot of this in Chrome 65.

chrome-split-mpb

The margin is in column box 1, then the top border, then the padding with a left and right border. This seems logical although probably not what anyone wants. Either way, we don't have any text describing what should happen in this case.

@rachelandrew rachelandrew added the css-multicol-1 Current Work label Apr 12, 2018
@rachelandrew rachelandrew self-assigned this Apr 12, 2018
@rachelandrew rachelandrew added this to Needs discussion in css-multicol-1 Apr 12, 2018
@fantasai
Copy link
Collaborator

fantasai commented Oct 21, 2018

We did discuss this in April, and the resolution gives roughly the result you drew (minus Chrome's fragmentation bugs). Which we agreed was a bit weird, but the alternative was to re-arrange the top mbp so that it starts after the spanner and we decided not to do that. Also this behavior is directly analogous to what happens with block-in-inline splits.

See #1072 (comment) for the resolution and the discussion leading up to it.

@mstensho
Copy link

Isn't this covered by the spec?

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

A spanning element may be lower than the first level of descendants as long as they are part of the same formatting context. If the fragment before the spanner is empty, nothing special happens; the top margin/border/padding is above the spanning element, as an empty fragment.

Not quite sure what "empty fragment" means, though.

@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed What happens to the mbp of the empty fragment created by a spanner being first-child of an element, and agreed to the following:

  • RESOLVED: close this issue no change
The full IRC log of that discussion <heycam> Topic: What happens to the mbp of the empty fragment created by a spanner being first-child of an element
<heycam> github: https://github.com//issues/2552
<heycam> rachelandrew: this may well be that it is covered, not convinced in the text
<heycam> ... when we resolved last time on 1072 about when the spanning element is a first child, we end up with an empty fragment, and the mbp ends up above it
<heycam> ... you get this strange issue, not specced, that if you have mbp its gets split across the columns
<heycam> ... I dont think it's behavior people want to expect
<heycam> ... would like it to be sure it doesn't happen
<Seinnd> whats going on in here? Who are you talking to heycam?
<heycam> fantasai: I think the fragmentation spec doesn't allow breaks within padding
<heycam> ... it's not possible to split it across all 3 columns
<heycam> rachelandrew: is this something that should be specced?
<heycam> fantasai: I think it should be ok, you can write a test for it
<heycam> ... the top mbp should all be as one unit in a single column, the only reason to ever split is if you have a situation where the fragmentainer is too short
<heycam> rachelandrew: so might not be an issue in the multicol spec
<heycam> florian: if the spanner is a child of a thing with a top margin...
<heycam> ... in general it's a thing that makes sense if it's the first thing
<heycam> ... earlier today we added properties to opt out of this problem
<heycam> rachelandrew: at the moment the behavior is not what anyone would want
<heycam> ... so probably can close this issue, I will check this
<myles_> is the a web platform test for this?
<fantasai> rachelandrew, https://www.w3.org/TR/css-break-3/#possible-breaks
<heycam> RESOLVED: close this issue no change

@rachelandrew rachelandrew moved this from Needs discussion to Done in css-multicol-1 Jan 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-multicol-1 Current Work
Projects
Development

No branches or pull requests

5 participants