Skip to content

[css-multicol] definition of column-span should say what happens without an ancestor multicol #1074

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

Closed
dbaron opened this issue Mar 3, 2017 · 12 comments
Assignees
Labels
css-multicol-1 Current Work

Comments

@dbaron
Copy link
Member

dbaron commented Mar 3, 2017

The definition of column-span: all should say what happens if there is no "nearest multicol ancestor in the same block formatting context". This is relatively straightforward; the column-span property doesn't do anything in that case. However, the spec should say so.

/cc @neerjapancholi

@dbaron dbaron added the css-multicol-1 Current Work label Mar 3, 2017
@mstensho
Copy link
Contributor

mstensho commented Mar 6, 2017

Also probably worth noting that invalid spanners don't force creation of new block formatting contexts and things like that, so that e.g. the following passes:

<!-- Not inside a multicol container. -->
<p>No red should be seen.</p>
<div style="float:left; width:20px; height:20px; background:green;"></div>
<div style="column-span:all; width:20px; height:20px; background:red;"></div>

@tantek
Copy link
Member

tantek commented Mar 7, 2017

Agenda+ing just to make sure the WG is ok with this proposal. Figuring we're going to talk a lot of multicol this week.

@tantek tantek added the Agenda+ label Mar 7, 2017
@astearns astearns removed the Agenda+ label Mar 8, 2017
@astearns
Copy link
Member

astearns commented Mar 8, 2017

Removing agenda+ until #1072 is resolved

@dbaron
Copy link
Member Author

dbaron commented Mar 8, 2017

This isn't particularly related to #1072, and I think it's trivial enough that it can be resolved at editor discretion if the existing implementations do the obvious thing.

@neerjapancholi
Copy link

Tested the case suggested by @mstensho on different browsers and posting results with screenshots:

Test case:
https://jsfiddle.net/Ld86cuwk/

Chrome 56.0.2924.87 (64-bit) Safari 10.0.3 (11602.4.8.0.1) Edge 38.14393.0.0
Does not create BFC Creates BFC Creates BFC

Screenshot of Chrome:
screen shot 2017-03-24 at 5 14 54 pm

Screenshot of Safari (same for Edge):
screen shot 2017-03-24 at 5 13 51 pm

@frivoal
Copy link
Collaborator

frivoal commented Mar 27, 2017

Firefox agrees with Chrome.
Ignore me, that's just because FF does not implement column-span yet.

@frivoal
Copy link
Collaborator

frivoal commented Mar 27, 2017

it's trivial [...] if the existing implementations do the obvious thing

Unfortunately, not all do. So we do need to talk…

@mstensho
Copy link
Contributor

So it looks like Chrome is the odd one here, right? In a way I find it strange that a property meant to be used inside multicol containers only has any effect on elements not inside such a container, but the spec does say that column-span applies to "in-flow block-level elements". The spec needs to become clearer. I have no strong opinions when it comes to the exact resolution, other than the fact that it should either be:

A: Chrome has a bug - fix the spec to say that column-span:all outside of multicol still establishes a new block formatting context (on that note: issue #1071 points out that "block formatting context" isn't good wording)

B: Beef up the spec and have the other browsers align with Chrome's behavior

@fantasai
Copy link
Collaborator

The case to think about here is, what if the designer had a two-column layout and then switched to a one-column layout. What's least likely to cause breakage? BFCs have to main behaviors that are relevant here: containing floats, and collapsing margins with children. Floats inside column-spanners might be a bit rare, but margins are common. It would imho make sense to preserve the BFC-ness to ensure the children of the spanner don't start collapsing with their parent.

@frivoal frivoal closed this as completed in a8634b9 Apr 5, 2017
@dbaron
Copy link
Member Author

dbaron commented Apr 7, 2017

In Wednesday's WG teleconference the group resolved:

  - RESOLVED: Have column-span elements create a bfc even if not in
              a multi-col container.
  - Florian will clarify the spec in the form of a note.

@yisibl
Copy link
Contributor

yisibl commented Apr 9, 2017

PR: Becomes a formatting context: #1179

Chrome fixed it in: https://bugs.chromium.org/p/chromium/issues/detail?id=709362

@frivoal
Copy link
Collaborator

frivoal commented Apr 11, 2017

@atanassov I've already made the edit almost a week ago (a8634b9) and closed the bug. I guess this Needs Editslabel is a mistake, and that you hadn't seen this was done already. If you actually want some more edits, please let me know what.

@yisibl Thanks for the quick fix in chrome. Would you have some Test cases to submit while you're at it? I'll review them ASAP if you do submit something. Btw, the relevant bug for the #1179 PR is #1071, not this one.

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
None yet
Development

No branches or pull requests

9 participants