Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save shelepuginivan/47a7f40d3d734d831f5d1dd56d648dcf to your computer and use it in GitHub Desktop.

Select an option

Save shelepuginivan/47a7f40d3d734d831f5d1dd56d648dcf to your computer and use it in GitHub Desktop.

AFAIK this problem only applies when working with Wayland, but you can use this solution in Xorg as well if it occurs.

There is a close button in Firefox titlebar:

image

It looks kinda out of place, especially when using a standalone Wayland compositor such as Niri or Hyprland.

You can remove this button and spacing to the left of it with the following CSS. Add it to your userChrome.css or create it you haven't already. Refer to this guide for more information.

/* Remove close button at the top right corner. */
.titlebar-buttonbox-container {
    display: none;
}

/* Remove close button spacing. */
.titlebar-spacer {
    display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment