DEV Community

Cover image for CSS is Emotional: Flexbox & Grid - A Love Story About Compromise
EIO • Emmanuel Imolorhe
EIO • Emmanuel Imolorhe

Posted on

CSS is Emotional: Flexbox & Grid - A Love Story About Compromise

Every great relationship is about balance. About finding space for each other. About knowing when to hold tight and when to give way. In the world of CSS, we see a complex negotiation of connection, where parents—Grid and Flexbox—teach their children the most profound lesson of all: how to truly care for one another.

Different Paths, Same Love

Grid is the parent of structured love. Precise. Predictable. Every moment carefully planned, every interaction meticulously organized:

.grid-parent {
    display: grid;  /* There is a place for everyone */
    grid-template-columns: repeat(3, 1fr);  /* Perfectly organized */
}
Enter fullscreen mode Exit fullscreen mode

Flexbox arrives differently—a parent of fluid love. Responsive. Adaptive. Always ready to reshape their approach:

.flex-parent {
    display: flex; /* Everyone finds their place */
    flex-wrap: wrap; /* Ready to bend over backwards */
}
Enter fullscreen mode Exit fullscreen mode

Adaptive Love

The children of Flexbox learn the most nuanced lesson—Truly listen and create space for each other's unique needs:

.ambitious-sibling {
    flex-grow: 2;  /* "I need more space!" */
}

.supportive-sibling {
    flex-grow: 1;  /* Expanding to meet another's need */
}

.reserved-sibling {
    flex-grow: 0;  /* "I'm content with what I have" */
}
Enter fullscreen mode Exit fullscreen mode

Imagine a moment: One sibling struggles. The others don't compete—they adjust. They redistribute their emotional bandwidth, making room for vulnerability.

The Compromise

Grid's children learn structure. Flexbox's children learn fluidity.
But the magic happens in between—where love becomes a dynamic, breathing entity.

Flexbox whispers: "Let's figure this out together."
Grid responds: "I've already planned everything for you."

CSS is Emotional - Kevin Powell: Isn't that amazing (GIF)

Beyond Code

This is more than just a technical choice. It’s not about which method is better—it’s about designing spaces where each element feels at home.

Flexbox teaches adaptability.
Grid offers security.

Your Love Algorithm

  • How do you balance structure and spontaneity?
  • Where in your code (and life) are you too rigid?
  • When does structure serve you best?

CI/CD - Compromise Intelligently / Coexist Dynamically

True love isn't about perfect alignment. It's about continuous adjustment, about creating a space where everyone can grow.

What layout of life are you currently navigating? Share your story of compromise and connection.


Next week: "The Psychology of Specificity"


Here's the CodePen used to design the banner 😊


About the Author

Emmanuel Imolorhe (EIO) is a Frontend Engineer passionate about CSS.
Check out my CSS videos on YouTube.

Connect with me

TwitterBlueskyLinkedInWebsite


Did this post help you? Have thoughts to share? Let's continue the conversation in the comments below!

Top comments (4)

Collapse
 
blessing_imolorhe_4006425 profile image
Blessing Afolabi

I've always wondered how websites are built. I never knew there was so much thought and planning that goes into it.
I'm still trying to wrap my head around all this Flexbox and Grid stuff, but it's cool to see how it can be used to create beautiful websites. Thanks for sharing!

Collapse
 
eioluseyi profile image
EIO • Emmanuel Imolorhe

I'm glad you're learning a lot.
You're welcome!

Collapse
 
favour_waziri_f1d130fa841 profile image
Favour Waziri

This is the 4th one I’m reading, I know I get the point, but it still feels very alien to me

Collapse
 
eioluseyi profile image
EIO • Emmanuel Imolorhe

Hey! Thanks for reading all four parts of the series! I'm glad you found them interesting enough to keep going 😅. While Flexbox and Grid might seem technical, they're tools developers use to create beautiful websites.

I'm glad that you get the point even though it feels alien to you, because that's the idea. ☺️
I want non-developers to be able to read the content and be able to follow, while CSS developers read it and become better developers.

Your curiosity might be a pointer to the fact that you have a calling in tech 😅
Of course, if you have any specific questions, feel free to ask.