Finally, CSS margin-trim!

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

As an alternative, it is possible to use owl selector ( * + *) to prevent margins at top/bottom

Akimb
Автор

Good to know it is an option (only in Safari, at the moment), but for most of my uses, I think the gap property (grid or flexbox) fills better that functionality.

ste-fa-no
Автор

I saw it a few days ago learning CSS margin, this is so good.

toilabanda
Автор

Superfeature. Helps to remove unnecessary code in css to cleanup margins and create content-ready layouts. Thank you for lighting it up. :)

stan_de
Автор

This is great. No more targeting last child. However, more often than not I’ve just used flex box and gap, is this a bad approach?

QuiGonJam
Автор

What about just using not and last of type pseudo selectors on the element for a margin bottom, which the last element will result in no margin bottom?

aman
Автор

Does this just collapse that last element's margin or are there other side-effects?

futuremoe
Автор

How do you show all the highlights is that just the Inspect feature?

Joshua-spkd
Автор

I'm still a beginner and this is like one of the first problems I've run into ... Seems like this would come up all the time... So how is it only now there's a good solution?

KevnReid
Автор

What s the vs code theme are you using?

eric.en_
Автор

Nice property; is the code demoed available publicly?

contigen
Автор

Was this really necessary? 🤔 By the way, has very little browser support so far

RobertoCinetto
Автор

Cool... But kinda makes up for sloppiness

dannnsss
Автор

This is actually cool and I am stuck at work for three hours can someone reply to me when you see this so I can be reminded to play with this at home? Thanks in advance

sundayylmao
Автор

CSS is starting to get a bit bloated with all of these stuff that is not really solving any real problem imo..

MrAzulay