Assume you have a 5x5 grid in CSS. There are items spanning different sizes, but no fixed to any specific position.
🤩 For such cases, using a "dense" mode for grid-auto-flow property allows you to "fill in the gaps" created by previous elements, by pushing latter elements that fit into the gap
🖼 This could be helpful for things like an image gallery, where you have random sizes of elements
📁 Sample code snippet:
🤩 For such cases, using a "dense" mode for grid-auto-flow property allows you to "fill in the gaps" created by previous elements, by pushing latter elements that fit into the gap
🖼 This could be helpful for things like an image gallery, where you have random sizes of elements
.grid {
grid-template-rows: repeat(5, 10rem);
grid-template-columns: repeat(5, 10rem);
}
.item-2 {
grid-row-end: span 2;
grid-column-end: span 2;
}Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
❤24👍5🔥2
Please open Telegram to view this post
VIEW IN TELEGRAM
👍10❤8
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
1❤59👍11🔥1
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
❤32👍11🔥1
I started as a front-end developer focused on clean code and design, but I soon realized that clients wanted more than just aesthetics... they needed visibility.
A stunning website means nothing if it doesn’t rank and attract traffic.
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
❤28🔥3👍1