Breakout

Breakout allows an item to break out of their containing element. To be honest, it’s just negative margins 😉.


Let an element break out of its container

Breakout lets the element break out of the container they are in. It uses negative margins to do this.

index.html
<div class="Breakout"></div>

Control the breakout amount

Use --breakout to control the amount you wish to break out.

index.html
<div class="Breakout [--breakout:2rem]"></div>

Breakout in 4 directions

Breakout works in 4 directions: top, bottom, left, and right. You can also use x for inline breakout and y for block breakout.

Top
Bottom
Left
Right

Inline and block breakouts

You can also use x for inline breakout and y for block breakout. For block breakouts, you need to ensure the element has sufficient height.

block
inline