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

UserCSS for browser client side decorations #340

Open
gaussandhisgun opened this issue Sep 19, 2023 · 1 comment
Open

UserCSS for browser client side decorations #340

gaussandhisgun opened this issue Sep 19, 2023 · 1 comment

Comments

@gaussandhisgun
Copy link

Is your feature request related to a problem? Please describe.

Some applications, notably browsers with their own CSD, have a toggle for enabling the system title bar. As it stands now, you can either:

  • have an extra bar on the top of your unmaximized browser, wasting screen space
  • have an extra set of buttons in your maximized browser, still wasting screen space, but less of it

I propose giving users an option - or, maybe, doing it by the extension? - to change this.

Describe the solution you'd like

Most modern browsers support a way of styling them with CSS. Here's an example on how to use it with Firefox. Perhaps, Unite settings can use the power of GJS to put the userCSS into the browser folders? Or, as an option, create a separate repo with userCSS files for different browsers and link it somewhere in the settings?

Describe alternatives you've considered

I've made this bit of userCSS for Firefox:

#main-window[sizemode*="maximized"] #titlebar .titlebar-buttonbox {
    visibility: collapse !important;
    display: none !important;
}

#main-window[sizemode*="maximized"] #nav-bar {
    padding-right: 3px !important;
}

This was made to fit this theme specifically (as it also conveniently themes Firefox to Epiphany), for stock Firefox the padding-right should be set to 0. Might need some extra handling for left aligned control buttons, but I don't use those, so I didn't add handling for them either.

Additional context

With the aforementioned gnome theme:
изображение
изображение

Without it (and with padding-right=0px):
изображение
изображение

@philipl
Copy link

philipl commented Oct 13, 2023

For default themed Firefox with left aligned controls, I use this:

:root[sizemode="maximized"] .titlebar-buttonbox-container {
  display: none;
}

I think by hiding the entire container, the padding doesn't matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants