- From: Sebastian Zartner via GitHub <sysbot+gh@w3.org>
- Date: Mon, 07 Aug 2017 12:52:29 +0000
- To: public-css-archive@w3.org
SebastianZ has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-pseudo] Pseudo-element for dragged element ==
There should be a way to style the "drag image" on a drag and drop action.
While dragging an element normally a drag image is shown (which can be changed via [`DataTransfer.setDragImage()`](https://html.spec.whatwg.org/multipage/dnd.html#dom-datatransfer-setdragimage)). UAs display this element semi-transparently or with a radial gradient and the cursor turns into a "forbidden" icon, but there doesn't seem to be a way to influence this styling.
This seems to be an obvious use case to me and I'm pretty sure this , though I couldn't find a discussion related to this here or on www-style.
So, my suggestion is to add a `::drag-image` (name to be bikeshedded) pseudo-element, that allows to change the UA styles of the drag image.
My use case is to allow moving elements within a container and while dragging I'd like to display them opaque.
**Example:**
```css
::drag-image {
opacity: 1;
mask: none;
}
```
Sebastian
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1703 using your GitHub account
Received on Monday, 7 August 2017 12:52:33 UTC