Skip Navigation

margin-trim as a best practice?

chriscoyier.net margin-trim as a best practice? - Chris Coyier

It’s not every day there is a new “best practice” for CSS, since it’s such a huge, ubiquitous, and highly used language. But here’s one, maybe? If you add padding in the main flow direction of an element, adding margin-trim in that same direction. If you have both padding and margin in the same dire...

A great look at some considerations surrounding a very welcome improvement to margins in CSS.

0
0 comments