User drag none utility class #8733
Replies: 11 comments 5 replies
-
I was looking for it in Tailwind, If it was added it would be helpful |
Beta Was this translation helpful? Give feedback.
-
For now, you can create your own plugin or use this: |
Beta Was this translation helpful? Give feedback.
-
@adamwathan please consider this in TailwindCSS |
Beta Was this translation helpful? Give feedback.
-
This should actually be part of TailwindCSS. |
Beta Was this translation helpful? Give feedback.
-
Just came into another use case for this and googled it and got back here lol. Any chance we can consider this feature? |
Beta Was this translation helpful? Give feedback.
-
Solution for now:
|
Beta Was this translation helpful? Give feedback.
-
@justingolden21 Any reason to not use the |
Beta Was this translation helpful? Give feedback.
-
Used |
Beta Was this translation helpful? Give feedback.
-
You can just use [-webkit-user-drag:none], which is described here. |
Beta Was this translation helpful? Give feedback.
-
You can use draggable='false' for img or a. This works for me |
Beta Was this translation helpful? Give feedback.
-
True, but we can solve this problem by creating exclusive class attribute in root.css .user-drag-none {
user-select: none;
-webkit-user-drag: none;
-khtml-user-drag: none;
-moz-user-drag: none;
-o-user-drag: none;
} |
Beta Was this translation helpful? Give feedback.
-
We have
select-none
but users can still drag ghost images. I think addingdrag-none
as a utility for:would be awesome. Thoughts?
See https://stackoverflow.com/a/32548403/4907950
Beta Was this translation helpful? Give feedback.
All reactions