Breaking out of the box
The design is full of angled sections, and Layout Builder only speaks rectangles. So I built custom blocks that lean. Each angled section is a CSS skew() transform on the outer element, with the inner content un-skewed by the exact same amount in the other direction.
The result: the section itself slants, but the text, images and buttons inside it sit in a perfectly normal rectangle, so they lay out, wrap and read exactly like everything else on the page. It’s all pattern-based Sass, so the angles flex with the content and the screen size instead of fighting them.
- Drupal
- Sass
- CSS