Email or username:

Password:

Forgot your password?
Dave 🧱 :cursor_pointer:

Reading about the new CSS margin-trim property on MDN and I’m like “CSS is truly spoiling us” 🥹 developer.mozilla.org/en-US/do

9 comments
James Basoo

@DavidDarnes it's cool, but these days im using flex/grid with gap more so I'm not sure how much I'd use it unless I needed irregular spacing

Dave 🧱 :cursor_pointer:

@Jbasoo its a nice option when you're in a bit of a squeeze, for example containing a bunch of items with their own margin while trying to align them to items outside of the container. I'm with you though, would prefer the parent to handle spacing between items

Miriam (still)

@DavidDarnes @Jbasoo The way I understand, this applies to flex items and grid areas - may be a way to remove default margins when a gap is present?

Tim Brown

@DavidDarnes I had the same reaction to this! Such a comfort.

Jen Simmons

@DavidDarnes Try it in Safari Technology Preview today!

Chris Coleman

@jensimmons ooh, logical values only. Way of the future, I like it.

Đăng Tú

@DavidDarnes damn, if this become stable, we can combine this with flexbox and grid with gap will ganna cry hard!

Go Up