[Vuejs]-My CSS in a Vue Project doesn't accept quoted URLs

0👍

Just to close this post.
I have not found an answer how to fix this issue but I this work-around works for me.

document.getElementById("app").style.cursor = 'unset';
body {
  cursor: url("./image.png"), auto;
}
#app {
  cursor: auto;
}

with ID "app" being the child of body.

-1👍

You an escape the semantics of quotation marks within the javascript language using the \ character. This basically means that ‘escaped’ quotation marks are just treated as " characters in your string, instead denoting the beginning and end of the actual string in your code. This allows you to add quotation marks in your quoted text:

document.getElementById("app").style.cursor = "url(\"../public/graphics/Nights_Edge.png\"), auto";

Leave a comment