-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firefox Color support #9
Comments
It could be difficult but not impossible. In order to support both Firefox Color colours and Chrome colours I'd need rethink the way I enforce the Chrome colours (I currently override the CSS vars). I'd probably need to create a Firefox Color theme with Chrome colours, but I'm not sure if this would be comprehensive enough. I'll stick a pin in it for now. Currently just trying to get the standard themes working without losing the Chrome colours. |
Looks like it wouldn't be possible to perfectly match the Chrome colours with Firefox Color. If you decode the URLs with json-url you'll notice you can only change 7 colours (well, I guess you can infer that from the UI too), but with some carefully arranged CSS you could get 90% of the way there. It will no longer respect the dark colour scheme in private browsing mode so I'm hesitant to go any further right now. |
Sounds tricky! That's OK if it can't be helped. Just wanted to bring it to your attention. :) |
Started to address this in 166c6ad. Basically how it will work is, this theme will for the most part not enforce any specific colours - it will leave this up to the current Firefox theme, which would be Default, Light, Dark, or a custom theme. To make life easier, a Firefox add-on will be used to manage switching between the default themes, installed custom themes, and a Material Light and Material Dark theme embedded in the add-on itself. The Material Dark theme will be forced on when in private browsing mode. I'll maintain the Firefox add-on in a separate repository and it will be optional (but recommended). See theme-compatibility branch (still a work in progress). |
Cool! That seems promising indeed. |
Could you try out MaterialFox Helper with the theme-compatibility branch and let me know how it goes? The theme should now be fully compatible with Firefox Color, regardless of whether you use the helper. Due to the complex way in which themes can be installed (either via theme extensions or add-ons which directly modify the theme), it is quite difficult for the add-on to know exactly what theme is enabled so it might sometimes say a theme is enabled but in fact another add-on (like Firefox Color) is overriding it. This is evident if you select a theme in the MaterialFox Helper button, then open up Firefox Color and select a preset in there. The helper button isn't and can't be aware of the Firefox Color themes and will think you've still got the previous theme enabled. I'll make a few modifications later so it doesn't tell you a theme is enabled when it has actually been overridden. |
I will check it ASAP. |
Thanks! One thing I neglected to think about is the fact that the add-on doesn't store any settings so the theme will reset after restarting the browser. Will hopefully have this fixed in the next version. |
Added persistent storage and improved compatibility with Firefox Color. It's still not perfect because I don't have access to Firefox Color's theme data - only current theme. Got a few ideas to improve it. Until then, select Default as theme and then set your colours with Firefox Color. If you change the theme again through MaterialFox Helper, you'll need to go and redo you Firefox Color selection. |
Interesting! Thanks for trying it out. Looks like I need to force the urlbar text colour to ensure it is either light or dark, and not leave it up to the theme to set it directly. Thought I was already doing this but must have missed something. The way it worked on Chrome when I tested was it either picks the regular light urlbar or dark urlbar and themes aren't allowed to affect it other than telling it to be the light or dark variant, and this is what I'm aiming for. |
I'm using vivaldifox for the moment and it seems to be working nice. I not sure how the extensions apply the colors but is working great in case you want an extensions that adapt the color from the site you visit like vivaldi browser. |
Should work even better with the windows-improvements branch. Just need to improve light theme compatibility. |
V2 has been released. https://www.ghacks.net/2018/10/03/style-firefox-with-firefox-color-version-2/ |
Thanks @Keith94. V2 should not affect compatibility, just adds more customisation. The thing MaterialFox doesn't let you specifically change is the urlbar background and text colour, keeping in line with Chrome. |
Haven't done anything to improve light theme compatibility but I think it's good enough to merge into master. Will mark this as closed now, all theme compatibility changes are in master. |
Not sure if it makes sense to support Firefox Color, but I thought I'd raise the issue anyway; the issue being that some of the pre-selected themes don't play nice with this theme.
The text was updated successfully, but these errors were encountered: