0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-31 10:52:42 +00:00

Add checkerboard behind image to show position

This commit is contained in:
Trevor Buckner
2022-09-16 00:30:39 -04:00
parent aba2746f89
commit d079985e6c
3 changed files with 13 additions and 35 deletions

View File

@@ -725,24 +725,6 @@ body {
} }
} }
//*****************************
// * MUSTACHE DIVS/SPANS
// *****************************/
.page {
.block {
break-inside : avoid;
display : inline-block;
.page :where(&) {
width : 100%;
}
//-webkit-transform : translateZ(0); //Prevents shadows from breaking across columns
}
.inline-block {
display : inline-block;
text-indent : initial;
}
}
//***************************** //*****************************
// * DEFINITION LISTS // * DEFINITION LISTS
// *****************************/ // *****************************/

View File

@@ -177,13 +177,17 @@ body {
width: 279.4mm; // Page height width: 279.4mm; // Page height
left:0px; left:0px;
bottom:0px; bottom:0px;
--rotation : 0;
--revealer : none; --revealer : none;
--checkerboard : none;
-webkit-mask-image : var(--wc), var(--revealer); -webkit-mask-image : var(--wc), var(--revealer);
-webkit-mask-repeat : no-repeat; -webkit-mask-repeat : no-repeat;
-webkit-mask-size : 100% 100%; -webkit-mask-size : 100% 100%;
mask-image : var(--wc); mask-image : var(--wc);
mask-repeat : no-repeat; mask-repeat : no-repeat;
mask-size : 100% 100%; mask-size : 100% 100%;
background-image: var(--checkerboard);
background-size: 20px;
z-index : -1; z-index : -1;
//background-image : url(/assets/watercolorMasks/testBackground.jpg); //background-image : url(/assets/watercolorMasks/testBackground.jpg);
//background-size : 0px; // Hide the background so it can be inherited into :before //background-size : 0px; // Hide the background so it can be inherited into :before
@@ -201,37 +205,29 @@ body {
& img { & img {
position : absolute; position : absolute;
display : block; display : block;
} bottom : 0;
&:before {
content:'';
position:absolute;
display:block;
height:100%;
width:100%;
bottom:0px;
background-image:inherit;
background-position: bottom 0px left 0px;
background-size:100% 100%;
background-repeat:no-repeat;
transform : rotate(calc(-1deg * var(--rotation)));
transition : transform 2s;
} }
&.bottom { &.bottom {
--rotation : 0; --rotation : 0;
& img {bottom: 0;}
} }
&.top { &.top {
--rotation : 180; --rotation : 180;
& img {top: 0;}
} }
&.left { &.left {
--rotation : 90; --rotation : 90;
& img {left: 0;}
} }
&.right { &.right {
--rotation : -90; --rotation : -90;
left : unset; left : unset;
right : 0px; right : 0px;
& img {right: 0;}
} }
&.revealImage { &.revealImage {
--revealer : linear-gradient(0deg, rgba(0,0,0,.2) 0%, rgba(0,0,0,0.2)); --revealer : linear-gradient(0deg, rgba(0,0,0,.2) 0%, rgba(0,0,0,0.2));
--checkerboard : url(/assets/waterColorMasks/missingImage.png); //shows any masked regions not filled by image
} }
} }
@@ -290,9 +286,9 @@ body {
.block { .block {
break-inside : avoid; break-inside : avoid;
display : inline-block; display : inline-block;
.page :where(&) { }
width : 100%; & :where(.block) {
} width : 100%;
} }
.inline-block { .inline-block {
display : inline-block; display : inline-block;

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B