technique where background expands box dimensions to spare wrapper element?

I remember vaguely that there was a trick that I've seen in a video from kevin where he shows how to expand a background without relying on a wrapper element. For example, when your text is supposed to have inline padding/margin to the parent borders, but the background should then expand to the parents width. Do I remember correctly that there was a trick or do I need a wrapper element?
2 Replies
clevermissfox
clevermissfox9mo ago
If I understand your question I think you’re asking about the grid alternative to the container KPow came up with https://youtu.be/c13gpBrnGEw?si=eu__4Z6xrrdnbaGE
Kevin Powell
YouTube
A new approach to container and wrapper classes
The wrapper or container is probably the most common design pattern around, but after coming across an article by Stephanie Eckles looking at how we can use a grid to emulate a container, and have simple breakouts — https://smolcss.dev/#smol-breakout-grid — I had an idea of how we could do this to completely drop the idea of containers, and then...
Wonderbear
WonderbearOP9mo ago
Yes that solved my problem, thanks
Want results from more Discord servers?
Add your server