SVG cursor has unwanted grey edge
up vote
0
down vote
favorite
i'm trying to use svg for a cursor and getting crappy grey edges. only happening with not vertical or horizontal edges (it was happening with diagonals as well as this circle) on certain color backgrounds.
tried messing with shape-rendering and borders but that didn't seem to help.
seems like maybe there's a shadow being automatically rendered or something? i don't know much about svg so maybe this is something obvious or just the way of the world.
edit: seeing this in chrome & safari
cursor css:
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
body
background:rgb(215, 248, 3);
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
square-cursor
display:block;
width:300px;
height:300px;
border:1px solid blue;
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100" ><polygon points="0,0 100,0 100,100 0,100" style="fill:#EAFB4C;"/></svg>'), pointer;
dark-background
display:block;
width:300px;
height:300px;
background:blue;
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
<body>
<square-cursor></square-cursor>
<dark-background></dark-background>
same svg dot not as cursor below:<br><svg width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>
</body>
html css svg
add a comment |
up vote
0
down vote
favorite
i'm trying to use svg for a cursor and getting crappy grey edges. only happening with not vertical or horizontal edges (it was happening with diagonals as well as this circle) on certain color backgrounds.
tried messing with shape-rendering and borders but that didn't seem to help.
seems like maybe there's a shadow being automatically rendered or something? i don't know much about svg so maybe this is something obvious or just the way of the world.
edit: seeing this in chrome & safari
cursor css:
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
body
background:rgb(215, 248, 3);
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
square-cursor
display:block;
width:300px;
height:300px;
border:1px solid blue;
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100" ><polygon points="0,0 100,0 100,100 0,100" style="fill:#EAFB4C;"/></svg>'), pointer;
dark-background
display:block;
width:300px;
height:300px;
background:blue;
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
<body>
<square-cursor></square-cursor>
<dark-background></dark-background>
same svg dot not as cursor below:<br><svg width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>
</body>
html css svg
What browser are you using? Not seeing any grey edges?
– user1178830
Nov 9 at 23:36
1
I see them in Chrome. Probably a rendering issue. With webkit. I think it's better to use a PNG instead. Or if you really need to render the SVG, you might want to actually render an inline SVG element and hide the cursor.
– lumio
Nov 10 at 0:16
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
i'm trying to use svg for a cursor and getting crappy grey edges. only happening with not vertical or horizontal edges (it was happening with diagonals as well as this circle) on certain color backgrounds.
tried messing with shape-rendering and borders but that didn't seem to help.
seems like maybe there's a shadow being automatically rendered or something? i don't know much about svg so maybe this is something obvious or just the way of the world.
edit: seeing this in chrome & safari
cursor css:
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
body
background:rgb(215, 248, 3);
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
square-cursor
display:block;
width:300px;
height:300px;
border:1px solid blue;
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100" ><polygon points="0,0 100,0 100,100 0,100" style="fill:#EAFB4C;"/></svg>'), pointer;
dark-background
display:block;
width:300px;
height:300px;
background:blue;
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
<body>
<square-cursor></square-cursor>
<dark-background></dark-background>
same svg dot not as cursor below:<br><svg width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>
</body>
html css svg
i'm trying to use svg for a cursor and getting crappy grey edges. only happening with not vertical or horizontal edges (it was happening with diagonals as well as this circle) on certain color backgrounds.
tried messing with shape-rendering and borders but that didn't seem to help.
seems like maybe there's a shadow being automatically rendered or something? i don't know much about svg so maybe this is something obvious or just the way of the world.
edit: seeing this in chrome & safari
cursor css:
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
body
background:rgb(215, 248, 3);
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
square-cursor
display:block;
width:300px;
height:300px;
border:1px solid blue;
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100" ><polygon points="0,0 100,0 100,100 0,100" style="fill:#EAFB4C;"/></svg>'), pointer;
dark-background
display:block;
width:300px;
height:300px;
background:blue;
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
<body>
<square-cursor></square-cursor>
<dark-background></dark-background>
same svg dot not as cursor below:<br><svg width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>
</body>
body
background:rgb(215, 248, 3);
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
square-cursor
display:block;
width:300px;
height:300px;
border:1px solid blue;
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100" ><polygon points="0,0 100,0 100,100 0,100" style="fill:#EAFB4C;"/></svg>'), pointer;
dark-background
display:block;
width:300px;
height:300px;
background:blue;
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
<body>
<square-cursor></square-cursor>
<dark-background></dark-background>
same svg dot not as cursor below:<br><svg width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>
</body>
body
background:rgb(215, 248, 3);
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
square-cursor
display:block;
width:300px;
height:300px;
border:1px solid blue;
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100" ><polygon points="0,0 100,0 100,100 0,100" style="fill:#EAFB4C;"/></svg>'), pointer;
dark-background
display:block;
width:300px;
height:300px;
background:blue;
cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>'), pointer;
<body>
<square-cursor></square-cursor>
<dark-background></dark-background>
same svg dot not as cursor below:<br><svg width="100" height="100"><circle cx="50" cy="50" r="50" style="fill:#EAFB4C;"/></svg>
</body>
html css svg
html css svg
edited Nov 10 at 0:31
asked Nov 9 at 23:31
milpool
169114
169114
What browser are you using? Not seeing any grey edges?
– user1178830
Nov 9 at 23:36
1
I see them in Chrome. Probably a rendering issue. With webkit. I think it's better to use a PNG instead. Or if you really need to render the SVG, you might want to actually render an inline SVG element and hide the cursor.
– lumio
Nov 10 at 0:16
add a comment |
What browser are you using? Not seeing any grey edges?
– user1178830
Nov 9 at 23:36
1
I see them in Chrome. Probably a rendering issue. With webkit. I think it's better to use a PNG instead. Or if you really need to render the SVG, you might want to actually render an inline SVG element and hide the cursor.
– lumio
Nov 10 at 0:16
What browser are you using? Not seeing any grey edges?
– user1178830
Nov 9 at 23:36
What browser are you using? Not seeing any grey edges?
– user1178830
Nov 9 at 23:36
1
1
I see them in Chrome. Probably a rendering issue. With webkit. I think it's better to use a PNG instead. Or if you really need to render the SVG, you might want to actually render an inline SVG element and hide the cursor.
– lumio
Nov 10 at 0:16
I see them in Chrome. Probably a rendering issue. With webkit. I think it's better to use a PNG instead. Or if you really need to render the SVG, you might want to actually render an inline SVG element and hide the cursor.
– lumio
Nov 10 at 0:16
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53234577%2fsvg-cursor-has-unwanted-grey-edge%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What browser are you using? Not seeing any grey edges?
– user1178830
Nov 9 at 23:36
1
I see them in Chrome. Probably a rendering issue. With webkit. I think it's better to use a PNG instead. Or if you really need to render the SVG, you might want to actually render an inline SVG element and hide the cursor.
– lumio
Nov 10 at 0:16