How to break elements outside of their container with CSS

View the source files on Github.

the css class "u-break-out" is scoped to the element childs?

Hey Gilvando, not sure I follow your question exactly, does this make sense below?


// These styles will only be applied to the child elements
// not the grandchild
.c-article__content > * {
  margin-right: auto;
  margin-left: auto;


<div class="c-article__content">
  <p>...</p> <!-- child -->
  <p>...</p> <!-- child -->
  <figure> <!-- child -->
    <img src="" alt=""> <!-- grandchild -->
  <p>...</p> <!-- child -->
  <blockquote> <!-- child -->
    <p>...</p> <!-- grandchild -->
  <p>...</p> <!-- child -->
  <p>...</p> <!-- child -->

Yeah, I'm going crazy. Css is my weakness. Always good to know new things. Thanks for the video.

Classic DEV Post from Sep 8 '17

What's your favorite useless repo/package/website/etc?

So I'm trying to remedy my carpal tunnel by considering making the decision to ...

Follow @andy to see more of their posts in your feed.