Re: [csswg-drafts] [css-align] behaviour for width or flex-basis of flex items when gap applied to flex container

> It is really frustrating to talking to you. Do you ever stop to consider what someone might be trying to say before coming to your conclusions?

Apologies for any perceived rudeness. Your question was asking about `span`, which doesn't carry over to Flexbox. The expanded details in your subsequent comment make your question much clearer. ^_^

The details of `gap` on flex containers are defined in <https://drafts.csswg.org/css-align/#gap-flex>.  In particular, `gap` has no effect on how %s resolve - a `width: 50%` still resolves to 50% of the flex container's inner width.  That means that two `width: 50%` items will *not* fit on a single line if there's a non-zero gap.

If you're using % widths, tho, you generally already know how many items fit on a line, and can use margins to produce gaps on your own (and make sure that, for example, all the %s add up to 100%).  `gap` is more useful when you have fixed-size items in a container of unknown width, or flexible items, because you don't know where the line-break will occur, and so can't target your margins appropriately. (If you use `margin-right` for the separation, for example, you need to *not* apply it to the last item on the line, so it's flush with the edge.)

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2668#issuecomment-388410528 using your GitHub account

Received on Friday, 11 May 2018 16:12:16 UTC