开发者

CSS grid and nested elements

开发者 https://www.devze.com 2023-03-23 14:02 出处:网络
Imagine you are using a CSS grid system and your page components are divs, snapped 开发者_如何学Pythonto the grid with a border radius.

Imagine you are using a CSS grid system and your page components are divs, snapped 开发者_如何学Pythonto the grid with a border radius.

If you wish to nest such components, the distance between the parent and child component must be at least a column width - right?

What if you want a smaller distance?

What if you want to nest up to 3 or 4 levels?

Any ideas?

Thanks


If you wish to nest such components, the distance between the parent and child component must be at least a column width - right?

Why are using border radius to line up blocks/columns in a grid? Shouldn't you be using margins?

If you want to line things up in a grid, all grid columns must have a gutter. What you're looking for in a CSS grid framework looks very much like 1KB Grid.

If you want more flexibility, you can use the Variable Grid System. From what you're proposing, there really isn't a need for you to use a custom grid or make a css grid framework.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号