Fix element position when dragged in homepage customizer
This commit is contained in:
parent
b7b27136fd
commit
a6169a80a9
2 changed files with 8 additions and 5 deletions
|
@ -122,7 +122,8 @@ export default function HomepageSort(props: Props) {
|
||||||
// $FlowFixMe
|
// $FlowFixMe
|
||||||
draggableProvided.draggableProps.style.left = draggedItemRef.offsetLeft;
|
draggableProvided.draggableProps.style.left = draggedItemRef.offsetLeft;
|
||||||
// $FlowFixMe
|
// $FlowFixMe
|
||||||
draggableProvided.draggableProps.style.top = draggedItemRef.offsetTop;
|
// draggableProvided.draggableProps.style.top = draggedItemRef.offsetTop;
|
||||||
|
draggableProvided.draggableProps.style.top = draggableProvided.draggableProps.style.top - 50;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -9,18 +9,19 @@
|
||||||
background-color: var(--color-ads-background);
|
background-color: var(--color-ads-background);
|
||||||
padding: var(--spacing-s);
|
padding: var(--spacing-s);
|
||||||
margin-right: var(--spacing-s);
|
margin-right: var(--spacing-s);
|
||||||
border: 1px solid var(--color-border);
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
outline: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.homepage-sort__bin--dashed {
|
.homepage-sort__bin--dashed {
|
||||||
border: dashed var(--color-border);
|
outline: dashed var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.homepage-sort__bin--highlight {
|
.homepage-sort__bin--highlight {
|
||||||
border-color: var(--color-primary);
|
outline-color: var(--color-primary);
|
||||||
border-width: 2px;
|
outline-width: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.homepage-sort__bin--no-bg {
|
.homepage-sort__bin--no-bg {
|
||||||
|
@ -42,6 +43,7 @@
|
||||||
padding: var(--spacing-xs) var(--spacing-m) var(--spacing-xs) var(--spacing-m);
|
padding: var(--spacing-xs) var(--spacing-m) var(--spacing-xs) var(--spacing-m);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: var(--font-small);
|
font-size: var(--font-small);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
margin-top: var(--spacing-xxs);
|
margin-top: var(--spacing-xxs);
|
||||||
|
|
Loading…
Reference in a new issue