I'm doing all of this to modify an already existing website using an extension called Stylus. Also, I'm doing this on Android. I use a browser called Kiwi Browser. It supports extensions.
I'm trying to make an element that sticks to the right of the screen so as to hide the scroll indicator on Android.
I can't hide that with ::-webkit-scrollbar {display: none}
or any variation of it because that element seems to be part of Android. My current solution is to add border-right: 5px solid gray !important
to the body element or any element where that would work.
I exaggerated the width there a bit so it'd very visible. With that border in place, the scroll indicator becomes invisible or unnoticeable because it has the same color as the border. Now, my problem is that when I zoom in on the page, especially on the very left part of the page, that scroll indicator is noticeable again. That's why now I want to try using ::after
. I'm trying to create an element that will stick to the right of screen even if I zoom in. I also don't want it to float. I want it to occupy space so that the content of the page will resize. I tried this code (which I also found here on stack) but it didn't work:
body::after{
content: " ";
position: -webkit-sticky !important;
position: sticky !important;
top: 0;
right: 0;
background: gray;
height: 100%;
width: 10px;
z-index: 9999 !important;
}
I use Kiwi Browser to read manga and comics. And the reason I want to hide that scroll indicator is because when you touch any part of the screen, that indicator appears and I can see how much is left from what I'm reading and that really ruins the mood for me.
Edit:
It seems that half of what I want to accomplish is not possible with just CSS. For reference: Prevent that a fixed element resizes when zooming on touchscreen