Reading about the new CSS margin-trim property on MDN and I’m like “CSS is truly spoiling us” 🥹 https://developer.mozilla.org/en-US/docs/Web/CSS/margin-trim
Dave 🧱 :cursor_pointer:
Reading about the new CSS margin-trim property on MDN and I’m like “CSS is truly spoiling us” 🥹 https://developer.mozilla.org/en-US/docs/Web/CSS/margin-trim 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?
Đăng Tú
@DavidDarnes damn, if this become stable, we can combine this with flexbox and grid with gap will ganna cry hard! |
@DavidDarnes 2023 “The Ambassadors Party” of CSS