Is there a way to remove the white outline that appears when dragging a draggable element from a dark background? I want to make it completely transparent.
Here is a visual representation:
https://i.sstatic.net/Eywf9.png
Here is the code snippet:
document.addEventListener("dragstart", (e) => {
const ghost = document.createElement("div");
// Styling done using Tailwind...
ghost.className = "bg-indigo-500 h-[30px] w-[100px] drop-shadow-md";
document.body.appendChild(ghost);
e.dataTransfer.setDragImage(ghost, 0, 0);
});
Update:
It seems that the issue with the white outlines only occurs in Chrome on Linux, not on Windows.