[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/css/ - CSS Masters

Advanced styling, animations & modern CSS techniques
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1793626048271.jpg (101.91 KB, 1024x1024, img_1793626041389_i3my12pg.jpg)ImgOps Exif Google Yandex

2ff71 No.2426

i'm tired of seeing people use margin-top on every single child element in a list. it's such a mess when you try to remove the last item or add an empty div. if you're using flex direction column, just set the gap property on the parent container instead.
.stack {display: flex;flex-direction: column;gap: 1rem;}

it's way cleaner and handles the spacing between items perfectly without any extra logic. what are you guys using to handle spacing in your vertical layouts?


[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]