Skip to content
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

[Enhancement] Add styling to settings dialogs #8

Open
66BA9Q-ME49 opened this issue Jan 19, 2025 · 9 comments
Open

[Enhancement] Add styling to settings dialogs #8

66BA9Q-ME49 opened this issue Jan 19, 2025 · 9 comments
Labels
✨ Enhancement New feature or request 🛫 Ready for flight Work on this has been finished and will be applied soon

Comments

@66BA9Q-ME49
Copy link

The theme currently does not apply any custom styling to dialog popups within the settings, causing them to use the default browser styling.

Examples

@Lockframe
Copy link
Owner

Hello.

Thank you for bringing this up, but I'm not sure it'd be possible to restyle those dialogues, as neither additions to custom.css nor userContent.css seem to have a proper effect.

Image

Would you happen to know a way around this?

@Lockframe Lockframe added the 🔍 Help wanted Extra attention is needed label Jan 20, 2025
@66BA9Q-ME49
Copy link
Author

66BA9Q-ME49 commented Jan 20, 2025

Firefox-UWP-Style managed to do that:

Image

And they even managed to edit dialogs:

Image

@66BA9Q-ME49
Copy link
Author

Found it!

Your approach

If I understand well, you use @-moz-document url-prefix(about:) to select only Firefox's pages, avoiding styling websites.
When I write this:

@-moz-document url-prefix(about:) {
	/* All your code */
	menulist {
		background-color: red !important;
	}
}

It appears like this:

Image

Firefox-UWP-Style's approach

In Firefox-UWP-Style, instead of using @-moz-document url-prefix(about:) they use @-moz-document regexp("chrome:\/\/(?!devtools).*"), regexp("about:(?!(blank|devtools)).*") which will apply the changes to all UI elements of Firefox except devtools.
Apparently, Firefox uses chrome:// URLs to load more "internal" UI parts.
So when I append this to your code:

/* All your code */
@-moz-document regexp("chrome:\/\/(?!devtools).*"), regexp("about:(?!(blank|devtools)).*") {
	menulist {
		background-color: red !important;
	}
}

The settings dialogs are correctly styled:

Image

Solution

Replace this line (userContent.css#L186) by this:

@-moz-document regexp("chrome:\/\/(?!devtools).*"), regexp("about:(?!(blank|devtools)).*") {

This excludes everything related to devtools because, unless you add specific compatibility, the styling corrupts a bit the devtools UI:

Image

If you're going to fix devtools, just replace the line by this:

@-moz-document url-prefix(chrome:), url-prefix(about:) {

@Lockframe
Copy link
Owner

Thank you, you are a lifesaver!

@Lockframe Lockframe added 🔧 WIP Currently being worked on and removed 🔍 Help wanted Extra attention is needed labels Jan 21, 2025
@66BA9Q-ME49
Copy link
Author

I installed the new version, and I love the new dialogs! You did a great work!
Here is a list of the glitches I noticed:

The Import Data menu is transparent and the dropdown is not completely styled

Image

The bottom of many dialogs is not visible until I resize them

Image

The Clear Data dialog has an non-styled surface

You can also see another example of dialog cropping in this image

Image

Some lists and tables have a styling issue

Image

The number inputs in the Connexion Settings dialog are not styled

Image

The table in the Saved Addresses and Saved payment methods dialog is not styled

Image

Icon and color selectors in containers settings have radio-box styling

Image

@Lockframe
Copy link
Owner

Are there any other dialogs I've missed after the last commit?

@66BA9Q-ME49
Copy link
Author

Hello!
You did a wonderful work!
Here are the problems I noticed in the last commit:

  • The up/down buttons of the number inputs in the Connection Settings dialog are still not styled and there is no spacing between the labels and the inputs
    Image

  • The table in the Saved Addresses and Saved payment methods dialogs are not styled
    Image

  • And the Applications table in General still has styling issues despite the great work on other tables
    Image

@Lockframe Lockframe added 🛫 Ready for flight Work on this has been finished and will be applied soon ✨ Enhancement New feature or request and removed 🔧 WIP Currently being worked on 🛫 Ready for flight Work on this has been finished and will be applied soon labels Feb 7, 2025
@Lockframe
Copy link
Owner

Have I missed any other dialogs after the latest commit?

@66BA9Q-ME49
Copy link
Author

There are still some issues with Saved Addresses and Saved payment methods dialogs.
Add/edit dialogs:
Image

Image

Selected table items:
Image

@Lockframe Lockframe added the 🛫 Ready for flight Work on this has been finished and will be applied soon label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Enhancement New feature or request 🛫 Ready for flight Work on this has been finished and will be applied soon
Projects
None yet
Development

No branches or pull requests

2 participants