diff --git a/quadrat/assets/rotated.svg b/quadrat/assets/rotated.svg index 23702a8f4d..619c8d4814 100644 --- a/quadrat/assets/rotated.svg +++ b/quadrat/assets/rotated.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/quadrat/assets/theme.css b/quadrat/assets/theme.css index 8f06306b9c..b3c5173675 100644 --- a/quadrat/assets/theme.css +++ b/quadrat/assets/theme.css @@ -29,13 +29,19 @@ /** * Reset the WP Admin page styles for Gutenberg-like pages. */ -.is-style-quadrat-cover-diamond:before, .is-style-quadrat-cover-diamond.wp-block-cover-image.has-background-dim:before, .is-style-quadrat-cover-diamond.wp-block-cover.has-background-dim:before { - background: #000; - width: 280px; - height: 280px; - margin: auto; +.is-style-quadrat-cover-diamond:after { + background-image: url(rotated.svg); + background-position: center; + background-repeat: no-repeat; + background-size: contain; + content: ""; mix-blend-mode: soft-light; - transform: rotate(18deg); + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + z-index: 0 !important; } @media (max-width: 479px) { diff --git a/quadrat/sass/blocks/_cover.scss b/quadrat/sass/blocks/_cover.scss index 7abd206343..bfad2c4c61 100644 --- a/quadrat/sass/blocks/_cover.scss +++ b/quadrat/sass/blocks/_cover.scss @@ -1,40 +1,16 @@ .is-style-quadrat-cover-diamond{ - - &, - &.wp-block-cover-image.has-background-dim, - &.wp-block-cover.has-background-dim { - - &:before { - background: #000; - width: 280px; - height: 280px; - margin: auto; - mix-blend-mode: soft-light; - transform: rotate(18deg); - // opacity: 1; - // z-index: 1; - // background-color: inherit; - // -webkit-mask-image: url(rotated.svg); - // -webkit-mask-size: contain; - // -webkit-mask-repeat: no-repeat; - // -webkit-mask-position: center; - // mask-image: url(rotated.svg); - // mask-size: contain; - // mask-repeat: no-repeat; - // mask-position: center; - // margin: auto; - } - + &:after { + background-image: url(rotated.svg); + background-position: center; + background-repeat: no-repeat; + background-size: contain; + content: ""; + mix-blend-mode: soft-light; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + z-index: 0 !important; //this avoids weird interactions on the editor } - - // &:after { - // content: ""; - // position: absolute; - // top: 0; - // left: 0; - // bottom: 0; - // right: 0; - // z-index: 0 !important; //this avoids weird interactions on the editor - // background-color: var(--wp--custom--color--background); - // } } \ No newline at end of file