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

Firefox-style userChrome.css #370

Closed
chadchoi opened this issue Dec 19, 2024 · 5 comments
Closed

Firefox-style userChrome.css #370

chadchoi opened this issue Dec 19, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request ready for release

Comments

@chadchoi
Copy link

Like in Firefox, disabled by default. Must be enabled in Settings to use.

@SpartanJ
Copy link
Owner

SpartanJ commented Dec 19, 2024

Sure but I must clarify that userChrome.css is always enabled by default, but it's an non-existent file, so it's only loaded when the user creates it, and that makes more sense than adding anything from the Settings menu. So from now on if the file in ~/.config/ecode/style.css exists it will load the user style. So to "enable" it you just need to provide the file. If a different user style should be loaded the --css parameter will still exist (and override the default style path).

This is already available in the nightlys.

@chadchoi
Copy link
Author

I accidentally switched to Light theme, and my style.css which is for the Dark theme breaks it.

@SpartanJ
Copy link
Owner

Which is totally fine... your style is your style and only yours. If you want to handle the light theme case you can just add some different rules for that using the media query: @media (prefers-color-scheme: light).

@chadchoi
Copy link
Author

Which is totally fine... your style is your style and only yours. If you want to handle the light theme case you can just add some different rules for that using the media query: @media (prefers-color-scheme: light).

Please elaborate more. I'm totally dumb about CSS. I simply want my modifications to only apply to the Dark theme.

@SpartanJ
Copy link
Owner

SpartanJ commented Dec 19, 2024

Oh, in that case you can put your modifications inside the media query that filters for dark color scheme:

(assuming you are using the config I left you yesterday)

@media (prefers-color-scheme: dark) {

Tab {
	background-color: #3f4b58!important;
	color: var(--font);
}

Tab:hover {
	background-color: #5f6b78!important;
}

Tab:selected {
	background-color: #171819!important;
}

}

@SpartanJ SpartanJ closed this as completed Feb 9, 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 release
Projects
None yet
Development

No branches or pull requests

2 participants