Flexbox Borders revisited (gap decorations) 0 ▲ Jeff Bridgforth 140 days ago · Culture · hide · Fediverse post Three years ago, I came up with a solution to add borders to a Flexbox layout by using the ::before and ::after pseudo elements. I had been inspired by Ahmad Shadeed’s Flexbox Dynamic Line Separator article. I wrote about my solution, CSS Trick: Flexbox Borders. It remains one of my more popular articles on search. Fast forward to 2026. There is a new CSS feature that is not yet Baseline available that will make my solution obsolete. The feature is called gap decorations. So I wanted to revisit my original solution and replace it with gap decorations. Gap decorations allow us to style the gaps between CSS Grid, Flexbox, and Multi-column layouts. There are also a lot of different options. You can break the lines so they do not intersect between rows and columns when using Grid layout. You can also inset gap lines so that they are not the full width or height and you can have different insets to create all sorts of different decorations. You can also control visibility so that lines… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town