Open Dragon-0609 opened 2 years ago
Ah, yeah that's a good idea. I think I might add it as separate feature from the main sticker installation. You'll have to hover over the sticker for a short duration before it hides.
After briefly looking into the issue, I forgot that I just put the stickers on a css psuedo element
, because extensions cannot add things to the VSCode's DOM tree.
https://github.com/doki-theme/doki-theme-vscode/blob/ce9522d4969030be73cc22745749b45dd3d51d3e/src/StickerService.ts#L138
So I'll probably need some more time to figure out how I want to get this to work. Adding a :hover
effect to the parent doesn't work, because the parent is the entire VSCode window, so the sticker hides immediately.
Adding a :hover effect to the parent doesn't work, because the parent is the entire VSCode window, so the sticker hides immediately.
What about transition
and opacity
?
.sticker {
width: 186px;
height: 218px;
transition: 1.5s;
background: url("asuna_dark.png") 0 0 no-repeat;
}
.sticker:hover {
opacity: 0;
}
<div class="sticker"></div>
Adding a :hover effect to the parent doesn't work, because the parent is the entire VSCode window, so the sticker hides immediately.
You can use transition and opacity to hide the sticker smoothly. In the previous comment I wrote about it.
If you are able to get image properties such as height and width, it should work:
<style>
.sticker::after {
position:absolute;z-index:9001;width:100%;height:100%;
}
.sticker > div::after {
position: absolute;
bottom: 0;
right: 0;
width: 186px; /* WIDTH AND HEIGHT IS NECESSARY */
height: 218px;
transition: 1.5s;
background-image: url("asuna_dark.png");
content:'';
background-repeat:no-repeat;opacity:1;
}
.sticker > div:hover::after {
opacity: 0;
}
</style>
<body>
<div class="sticker">
<div></div>
</div>
</body>
Yeah, that'd be nice if I could get the sticker put into a box the size of it, but right now the stickers are in this parent:
So I'll have to see if I can put them in a smaller parent, or some how inject it in.
how to remove the sticker?
Is your feature request related to a problem? Please describe. It isn't such big problem, but it would be great if the problem will be solved. It is inconvenient when you can't see which terminal is active. I could increase height of the terminal, but that isn't point.
Describe the solution you'd like When the user hovers the sticker, it'll be hidden till the user doesn't move the cursor away.