overdodactyl / ShadowFox

A universal dark theme for Firefox
https://overdodactyl.github.io/ShadowFox/
MIT License
1.32k stars 58 forks source link

Theme Scrollbars #147

Closed 5HT2 closed 6 years ago

5HT2 commented 6 years ago

Theme scrollbars or have and option to hide them would be great. Because this just ruins the experience: image Edit: Add enhancement tag please

overdodactyl commented 6 years ago

Scroll bars are a bit tricky because because they can't be styled with userChrome/content.css alone, instead you have to make use of userChrome.js. Additionally, scroll bars vary from OS to OS. In the wiki, I've linked to a solution created by @Sporif for Windows users:

https://github.com/overdodactyl/ShadowFox/wiki/More-Tweaks#userchromejs

They can be hidden using a similar approach as well

CaptaPraelium commented 6 years ago

I followed those instructions and they didn't work here. The windows scrollbar colours are awful and can't be customised. I gave up on this one I'm afraid. If anyone has any luck making that tweak work, please do let me know!

overdodactyl commented 6 years ago

Glad it helped @ChristoferMinestar!

@CaptaPraelium, I was able to get it to work by doing the following:

  1. Download the content here with the name dark-scrollbar.as.css and save it in your chrome directory.

  2. Add the content here to your userChrome_customization.css file.

  3. Run the updater script.

  4. Restart Firefox

CaptaPraelium commented 6 years ago

OMG IT WORKS I swear that's exactly what I did last time and it didn't work. I'll never know what I screwed up but thanks so much for helping! I have some eye problems and this is really a big deal. THANK YOU

wum0u commented 6 years ago

I've tried this one before, but it makes ShadowFox working weirdly on my Win10. It seems that #content got overridden by ShadowFox. snipaste_2018-05-13_18-42-47

overdodactyl commented 6 years ago

Happy you got it working @CaptaPraelium!

@ngoo5tsong5sik - Is it possible you have some extra .css files or anything in your chrome directory? userChrome.js works by loading in certain file types:

You may also place userChrome.xul and .uc.js, .uc.xul and .css files in the /chrome directory, these will be loaded along with userChrome.js

https://github.com/Sporif/firefox-quantum-userchromejs

It's possible userChrome.js is loading in the weird styling from a file that normally dosn't go into effect.

CaptaPraelium commented 6 years ago

I'm seeing this same behaviour today, but I wasn't after that post I made above. It didn't start doing it until I updated ff nightly this morning, so I figured it was a nightly glitch, or youtube theme (I use 'enhancer for youtube' addon, with the 'deep dark by raitaroh' theme (nice match with shadowfox!). It's only youtube that's doing it.

I'll do some digging tomorrow and get back to you.

CaptaPraelium commented 6 years ago

The updater's backups are the culprit. Remove all those "userChrome.backup.2018-03-08_10-05-27.css" files, run the updater, remove the backups it just made when you ran it again, good to go.

I'll file a bug on the updater repo now.

overdodactyl commented 6 years ago

Thanks for looking into this @CaptaPraelium! I wasn't able to reproduce with a new profile + ShadowFox and scrollbars...so this explains why.

I didn't realize userChrome.js recursively looked through all files in the chrome directory.

It might be worth forking the userChrome.js and seeing if I can modify it to be a bit more selective (for example, we don't need tweaks in the customization directory being loaded twice).

Regardless, I think switching the file type in the backups is a good idea

CaptaPraelium commented 6 years ago

Oh wow I didn't even consider the customisation scripts. I can certainly envision double-loading those could break things. Yeh, I think a fork might be a good idea.

I didn't realise until I got it working, that this tweak not only effects the window (chrome) scrollbar, but any scrollbars that appear in the page content. It really puts the icing on the cake and I think it's worthwhile to ensure it works.

Perhaps we're now trying to tweak windows rather than firefox though? I may be biased here. Then again, the userChrome.js does serve other purposes, so I'll stick to my bias for now ;)

overdodactyl commented 6 years ago

I've added a fork of the gist here:

https://gist.github.com/overdodactyl/c0c3698b7b9a635f3bf8c0ac9fcd3442

This version should only load files within the directory chrome/userjs_files

KarelPeeters commented 5 years ago

Any reason why this isn't done by default in ShadowFox?

anubis-genix commented 5 years ago

Any reason why this isn't done by default in ShadowFox?

I'd love to see it implemented by default