You have two good options. One of them is a simplified version of what you have. Since by default block elements are 100% wide, you can simply exclude the width setting (and all this hacking math).
header { height: 150px; margin: 0 0 - $grid-padding; }
Another option is to use multiple containers per page. This requires a change in markup, but sometimes it is a simplification that works well. If you move the title outside the current container and declare it as your own container, this will do the trick.
(as a note: if you need full width, you can just use the columns-width()
function (for the inner width, no fill) or container-outer-width()
for the full width, including padding.)
UPDATE:
I use this mixin to apply bleeding anywhere I need it:
@mixin bleed($padding: $grid-padding, $sides: left right) { @if $sides == 'all' { margin: - $padding; padding: $padding; } @else { @each $side in $sides { margin-
Some examples:
#header { @include bleed; } #nav { @include bleed($sides: left); } #main { @include bleed($sides: right); } #footer { @include bleed(space(3)); }
source share