Re: [csswg-drafts] [css-align] gap properties for block layout

That's a reasonable use case, and it's come up a bunch in the past. How about we repurpose this issue to solve the use case by controlling margins? :) An “eat the first/last margins inside me” switch has been wanted for awhile; Quirks mode tables even did this automatically on table cells.

Here's a first proposal (riffing off https://drafts.csswg.org/css-text-4/#white-space-trim)

```
margin-trim: none |  in-flow | all
```

- in-flow trims in-flow collapsed block-axis margins at the start/end of a block container
- all also trims the start/end margins of floated elements at the start/end of the block container

Open question: Should this also trim the edge-adjacent margins of flex items? Grid items?

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

Received on Thursday, 30 August 2018 22:23:17 UTC