From 251b6a8e3fecd77deafdedf088ba492d68e7f1a0 Mon Sep 17 00:00:00 2001 From: marcoc Date: Thu, 11 Jan 2024 18:04:20 +0100 Subject: [PATCH] added cover block support and .fullwidth class --- assets/styles/layout/_main.scss | 89 +++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/assets/styles/layout/_main.scss b/assets/styles/layout/_main.scss index e69de29..25284f2 100755 --- a/assets/styles/layout/_main.scss +++ b/assets/styles/layout/_main.scss @@ -0,0 +1,89 @@ +.wp-block-cover { + position:relative; + overflow-x: hidden; + + img { + width: 100%; + + @include resp-max($breakpoint-md) { + width: 120%; + max-width: unset; + height: auto; + position: relative; + left: 50%; + transform: translateX(-50%); + } + + @include resp-max($breakpoint-sm) { + height: 80vh; + width: auto; + position: relative; + left: 70%; + } + + @include resp-max($breakpoint-xs) { + left:100%; + } + } + + .wp-block-cover__inner-container { + position: absolute; + bottom:50%; + left: 50%; + transform: translate3d(-50%,50%,0); + width: 100%; + z-index: 3; + } +} + +.fullwidth { + + &.row { + gap:20px; + + &::before, + &::after { + display:none; + } + + @include resp-min($breakpoint-sm) { + .col { + padding-left:0; + } + } + } + + @include resp-min($grid-max-width) { + margin-left: calc(0px - $grid-gutter - ((100vw - $grid-max-width) / 2)); + margin-right: calc(0px - $grid-gutter - ((100vw - $grid-max-width) / 2)); + } + + @include resp-max($grid-max-width - 1) { + margin-left: calc(0px - $grid-gutter); + margin-right: calc(0px - $grid-gutter); + } + + @include resp-max($breakpoint-sm) { + >* { + padding-left: $grid-gutter; + padding-right: $grid-gutter; + } + } + + >div.is-layout-constrained { + @include clearfix; + max-width: $grid-max-width; + margin: 0 auto; + padding: 0 $grid-gutter; + + >div.row { + @include resp-max($breakpoint-sm) { + margin-right: -$grid-gutter; + + .col { + padding-right: $grid-gutter; + } + } + } + } +} \ No newline at end of file