0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-08 20:23:39 +00:00

Implement scaling, but not added to snippet

This commit is contained in:
Trevor Buckner
2023-02-22 14:49:11 -05:00
parent 096b3d00fc
commit 90d5ac4603

View File

@@ -259,7 +259,7 @@
height : 50%; height : 50%;
bottom : 50%; bottom : 50%;
left : 50%; left : 50%;
transform : translateX(-50%) translateY(50%) rotate(calc(-1deg * var(--rotation))) scaleX(var(--scaleX)) scaleY(var(--scaleY)); transform : translateX(-50%) translateY(50%) rotate(calc(-1deg * var(--rotation))) scaleX(calc(1 / var(--scaleX))) scaleY(calc(1 / var(--scaleY)));
transition : transform 2s; transition : transform 2s;
} }
& img { & img {
@@ -311,16 +311,17 @@
mask-repeat : no-repeat; mask-repeat : no-repeat;
mask-size : 100% 100%; //Scale both dimensions to fit page size mask-size : 100% 100%; //Scale both dimensions to fit page size
mask-position : 50% 50%; mask-position : 50% 50%;
transform : rotate(calc(1deg * var(--rotation))); transform : rotate(calc(1deg * var(--rotation))) scaleX(var(--scaleX)) scaleY(var(--scaleY));;
& > p:has(img) { & > p:has(img) {
width : 50%; width : 50%;
height : 50%; //Complex transform below to handle mix of % and cm offsets height : 50%; //Complex transform below to handle mix of % and cm offsets
left : 25%; left : 25%;
bottom : 25%; bottom : 25%;
transform : rotate(calc(-1deg * var(--rotation))) transform : scaleX(calc(1 / var(--scaleX))) scaleY(calc(1 / var(--scaleY)))
rotate(calc(-1deg * var(--rotation)))
translateX(calc(-1 * var(--offsetX))) translateX(calc(-1 * var(--offsetX)))
translateY(calc(1 * var(--offsetY))) translateY(calc(1 * var(--offsetY)));
scaleX(var(--scaleX)) scaleY(var(--scaleY));
} }
// &.bottom { // &.bottom {
// --rotation : 0; // --rotation : 0;