I forgot to say that sprites can be used on buttons.
what you described i think it will help you
https://www.w3schools.com/cssref/pr_background-position.asp
and
https://www.w3schools.com/cssref/css3_pr_background-size.asp
I forgot to say that sprites can be used on buttons.
what you described i think it will help you
https://www.w3schools.com/cssref/pr_background-position.asp
and
https://www.w3schools.com/cssref/css3_pr_background-size.asp
Oh, sprites on buttons! Interesting!
Thanks for the positioning reference this works for the background but sprites are moved according to the container size (my background is usually on contain, because I want to see it all, but sprites take the whole container size rather than staying on the background, obviously).
My current workaround is to set a fixed aspect ratio but I'll investigate other solutions as well
#tuesday {
aspect-ratio: 1 / 1;
height:auto !important;
}
OK, in case somebody wants to do the same thing than me, and assuming here a square aspect ratio, this CSS will ensure that both "contain" background images and percent sprites are always visible and stay at the same place, whatever the screensize is :)
#tuesday {
aspect-ratio: 1 / 1;
height:auto !important;
max-width: min(100vw,100vh);
margin: 0 auto;
}
Thanks again Kirill, I've just completed and published my game if you wanna check it.
https://jsmonzani.itch.io/silent-voices
I had to use a lot of !important in my CSS to override the default CSS styles but other than that, I think it's good.
Thank you! Yes, sure!
I've also designed another short story some weeks ago with Tuesday js if you wanna try, with a different art style https://jsmonzani.itch.io/fushimi-inari-a