G
G
godsplane2021-07-23 07:20:00
css
godsplane, 2021-07-23 07:20:00

How to indent between blocks in a flex container correctly?

https://codepen.io/poylar/pen/poPdoZP Let
's take a banal example. I need padding between 1rem blocks, but there should be no padding at the edges of wrap.
On grids, I would do grid-gap, but on flexes, what is the right way?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Dubrovin, 2021-07-23
@alekcena

Usually, in such cases, I always do something like this
https://codepen.io/alekcena/pen/eYWeYPy

D
Dimka59, 2021-07-23
@Dimka59

something like this https://jsfiddle.net/vasif534/4vwanmh3/38/

D
Dmitry, 2021-07-23
@By_Engine

Gap works with flex, but support isn't great

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question