diff --git a/quadrat/assets/theme.css b/quadrat/assets/theme.css index 291c51f700..170ef39094 100644 --- a/quadrat/assets/theme.css +++ b/quadrat/assets/theme.css @@ -44,6 +44,26 @@ z-index: 0 !important; } +.is-style-quadrat-cover-diamond.has-white-background-color.wp-block-cover.has-background-dim:not(.has-background-gradient)::before, .is-style-quadrat-cover-diamond.has-black-background-color.wp-block-cover.has-background-dim:not(.has-background-gradient)::before { + opacity: 0; +} + +.is-style-quadrat-cover-diamond.has-white-background-color:after, .is-style-quadrat-cover-diamond.has-black-background-color:after { + mix-blend-mode: normal; + mask-image: url(rotated.svg); + mask-repeat: no-repeat; + mask-size: contain; + mask-position: center; +} + +.is-style-quadrat-cover-diamond.has-white-background-color:after { + background: black; +} + +.is-style-quadrat-cover-diamond.has-black-background-color:after { + background: white; +} + @media (max-width: 479px) { .wp-block-media-text .wp-block-media-text__content { padding: var(--wp--custom--margin--vertical) 0; diff --git a/quadrat/child-experimental-theme.json b/quadrat/child-experimental-theme.json index f4b22f7e66..33584f76aa 100644 --- a/quadrat/child-experimental-theme.json +++ b/quadrat/child-experimental-theme.json @@ -4,6 +4,16 @@ "color": { "gradients": [ ], "palette": [ + { + "slug": "black", + "color": "#000000", + "name": "Black" + }, + { + "slug": "white", + "color": "#ffffff", + "name": "White" + }, { "slug": "pink", "color": "#FFD1D1", diff --git a/quadrat/experimental-theme.json b/quadrat/experimental-theme.json index 792b78ec1b..7815cc043a 100644 --- a/quadrat/experimental-theme.json +++ b/quadrat/experimental-theme.json @@ -18,6 +18,16 @@ "color": { "gradients": [], "palette": [ + { + "slug": "black", + "color": "#000000", + "name": "Black" + }, + { + "slug": "white", + "color": "#ffffff", + "name": "White" + }, { "slug": "pink", "color": "#FFD1D1", diff --git a/quadrat/sass/blocks/_cover.scss b/quadrat/sass/blocks/_cover.scss index bfad2c4c61..b9c779e906 100644 --- a/quadrat/sass/blocks/_cover.scss +++ b/quadrat/sass/blocks/_cover.scss @@ -13,4 +13,23 @@ right: 0; z-index: 0 !important; //this avoids weird interactions on the editor } + &.has-white-background-color, + &.has-black-background-color { + &.wp-block-cover.has-background-dim:not(.has-background-gradient)::before { + opacity: 0; + } + &:after { + mix-blend-mode: normal; + mask-image: url(rotated.svg); + mask-repeat: no-repeat; + mask-size: contain; + mask-position: center; + } + } + &.has-white-background-color:after { + background: black; + } + &.has-black-background-color:after { + background: white; + } } \ No newline at end of file