Merge pull request #61 from mathuo/60-adjust-droptarget-css

feat: adjust css to use transform methods
This commit is contained in:
mathuo 2022-04-21 21:24:14 +01:00 committed by GitHub
commit 98e0ac340f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,6 @@
> .drop-target-selection { > .drop-target-selection {
position: relative; position: relative;
pointer-events: none;
box-sizing: border-box; box-sizing: border-box;
height: 100%; height: 100%;
width: 100%; width: 100%;
@ -19,31 +18,37 @@
transition-duration: 0.15s; transition-duration: 0.15s;
transition-timing-function: ease-out; transition-timing-function: ease-out;
will-change: transform;
pointer-events: none;
&.left {
transform: translateX(-25%) scaleX(50%)
}
&.left,
&.right { &.right {
width: 50%; transform: translateX(25%) scaleX(50%)
} }
&.right {
transform: translate(100%, 0%); &.top {
transform: translateY(-25%) scaleY(50%);
} }
&.bottom { &.bottom {
transform: translate(0%, 100%); transform: translateY(25%) scaleY(50%);
}
&.top,
&.bottom {
height: 50%;
} }
&.small-top { &.small-top {
border-top: 1px solid var(--dv-drag-over-border-color); border-top: 1px solid var(--dv-drag-over-border-color);
} }
&.small-bottom { &.small-bottom {
border-bottom: 1px solid var(--dv-drag-over-border-color); border-bottom: 1px solid var(--dv-drag-over-border-color);
} }
&.small-left { &.small-left {
border-left: 1px solid var(--dv-drag-over-border-color); border-left: 1px solid var(--dv-drag-over-border-color);
} }
&.small-right { &.small-right {
border-right: 1px solid var(--dv-drag-over-border-color); border-right: 1px solid var(--dv-drag-over-border-color);
} }