arguablykomodo / shadowfox-updater

An auto-updater for ShadowFox
https://github.com/overdodactyl/ShadowFox
MIT License
254 stars 16 forks source link

Color Override not applied #24

Closed Devo7v closed 5 years ago

Devo7v commented 5 years ago

The updater is working great, however I cannot get the colorOverrrides.css to be properly integrated. internal_UUIDs.txt, userChrome_customization.css, and userContent_customization.css are being properly, so it is not an issue where the updater cannot find the customization files. I only have the following in my colorOverrides.css but when running the updater it used the default color. --grey-70: #333333;

overdodactyl commented 5 years ago

--grey-70 is actually a variable set by Firefox. If you want to override that one, you'll have to append !important:

--grey-70: #333333 !important;

I tested this and it seems to works, but I would recommend altering the tone values instead. See the example here:

https://github.com/overdodactyl/ShadowFox/wiki/Customization

Edit: I guess the caveat to that suggestions is if you trying to change the color of something ShadowFox doesn't adjust, the tone values will not have an effect.

Devo7v commented 5 years ago

I am able to set --grey-70: #333333; manually within userChrome and userContent and it has the desired effect.

I guess I'm a little confused on how the updater modifies userChrome and userContent. I was assuming (and maybe incorrectly) that the updater downloads the latest version of userChrome.css and userContent.css form your GitHub repo and then basically does a find/replace of the variables in the first 128 lines and replaces it with what the user has in colorOverrides.css.

Looking at it further it looks like it is adding the user-defined colors to the bottom of the list rather than replacing what is already in the list. I'm wondering if this will cause an issue since the the --tone variables are set before you reach the end of the list where the user colors are added. Regardless I'm wondering how the css will handle the variable being set to two different values.

As for the caveat you mentioned, that sounds like a very specific case that I hadn't thought of.

arguablykomodo commented 5 years ago

CSS will always pick the rule at the bottom if a rule is duplicated, so by inserting the custom colors at the bottom it works correctly.

Devo7v commented 5 years ago

Thanks for clarifying. I've been able to confirm that the color changes I've made are working correctly.

The only other thing I've noticed is that the following code needs to be added to userChrome.css unless it was purposefully left out. @-moz-document url-prefix(chrome://){ window{ background-color: var(--in-content-page-background)!important; color: var(--in-content-page-color)!important; } }

overdodactyl commented 5 years ago

Glad it's working for you!

The only other thing I've noticed is that the following code needs to be added to userChrome.css unless it was purposefully left out...

What would this style that's not currently?

Devo7v commented 5 years ago

It styles the header of the window background as you can see in the attached screenshots. The only way I can get the window to be dark is if I add that code to the userChrome_customization.css file.

capture2

capture1

overdodactyl commented 5 years ago

Thanks for the screenshots - do you have the default dark theme selected?

The default one should style that, but maybe your OS theme or somethings is overriding it?

Devo7v commented 5 years ago

Thanks for the screenshots - do you have the default dark theme selected?

The default one should style that, but maybe your OS theme or somethings is overriding it?

Yes, I have the dark theme applied within Firefox.

As far as OS theming, I have the default Windows 7 theme applied and unfortunately I cannot change it from the standard ones built into Windows because I do not have Admin rights to the computer to be able to modify the dll's to be able to use custom themes.

overdodactyl commented 5 years ago

I've moved the issue over to https://github.com/overdodactyl/ShadowFox/issues/198.

I think it's fixed, so feel free to close that one or let me know if it doesn't work :)