black7375 / black7375/Firefox-UI-Fix

Min, max and close buttons misaligned when using compact/normal mode with vertical tabs

Open
#675 5 comments 0 reactions 0 assignees View on GitHub
Class::Layout-Others Component::Tabbar Env::Windows Issue::Bug
Dominant language
SCSS
Stars
5.9k
Forks
202
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

I have the horizontal tabbar disabled and have Tree style tabs installed for vertical tabs.

This bug doesn't happen when not using vertical tabs.

When using normal density the hover effects don't fill the full space, in compact mode the hover effects take too much space.

This bug is only visible when hovering over any of the 3 buttons.

Should I also provide my Tree style tabs settings or would that not be the cause of this bug?

### Expected behavior

The buttons should be aligned properly.

### Screenshots

You might have to zoom in.

Compact:
![image](https://user-images.githubusercontent.com/78969986/231403306-d3befe0d-dafc-4872-8b0e-0bb273851b91.png)
![image](https://user-images.githubusercontent.com/78969986/231403750-55832c3f-c255-4504-bc49-c6950f4d086a.png)
![image](https://user-images.githubusercontent.com/78969986/231403809-60d0e161-43e3-4862-ae7c-2e10fea1d88b.png)

Normal:
![image](https://user-images.githubusercontent.com/78969986/231409870-efc0a0d0-1d15-4d77-9c96-bd1cc3911221.png)
![image](https://user-images.githubusercontent.com/78969986/231410094-ab3a4f05-47a7-47e4-9446-7a23bc6e4e07.png)

### OS

Windows 10

### OS - Others

_No response_

### Firefox Version

v 112.0

### Distribution

- [ ] [Original Lepton](https://github.com/black7375/Firefox-UI-Fix)
- [ ] [Lepton's photon style](https://github.com/black7375/Firefox-UI-Fix/tree/photon-style)
- [X] [Lepton's proton style](https://github.com/black7375/Firefox-UI-Fix/tree/proton-style)

### Theme

- [ ] Light
- [X] Dark
- [ ] Alpenglow (System: Light)
- [ ] Alpenglow (System: Dark)
- [ ] System Default
- [X] Others: (e.g. [Photon Colors](https://addons.mozilla.org/en-US/firefox/addon/photon-colors/), [Google Chrome Dark](https://addons.mozilla.org/en-US/firefox/addon/google-chrome-dark/), [Fairytale Of Nature](https://addons.mozilla.org/en-US/firefox/addon/fairytale-of-nature/))

### Theme - More Info

The system theme is dark mode and the specific theme I use in firefox is this one:
https://addons.mozilla.org/en-GB/firefox/addon/perfect-darkness/

### `user.js` setup

```
user_pref("userChrome.icon.disabled", true);
user_pref("userChrome.hidden.tabbar", true);
user_pref("userChrome.autohide.sidebar", true);
user_pref("userChrome.hidden.sidebar_header", true);
user_pref("userChrome.hidden.sidebar_header.vertical_tab_only", true);
user_pref("userChrome.sidebar.overlap", true);
```

### Additional context

My userChrome is as follows:

```
/*** Right-click menu ***/

html#main-window menupopup:not(.in-menulist) {
--menu-border-color: black !important;
--panel-border-color: var(--menu-border-color) !important;
}

html#main-window menupopup:not(.in-menulist) menuseparator {
--menu-border-color: black !important;
border-top: 1px solid var(--menu-border-color) !important;
}

/*** Drop-down menus menu ***/

:root {
--panel-separator-color: black !important;
}

html#main-window menupopup:not(.in-menulist, [placespopup]) menuseparator,
toolbarbutton menupopup[placespopup] menuseparator::before {
--menu-border-color: black !important;
}

/*** Nav bar horizontal seperators ***/

:root{
--autocomplete-popup-separator-color: black !important;
}

/*** Tooltips ***/

tooltip {
background-color: #1E2021!important;
color: white!important;
border-color: black!important;
}

/*** Statuspanel ***/

:root #statuspanel-label{
background-color: rgb(30,32,33) !important;
color: rgb(255,255,255) !important;
border-color: black !important;
}

/*** Footer & Container ***/

#customization-footer {
border: black !important;
background-color: #1E2021 !important;
}

#customization-container {
background-color: #1E2021 !important;
background-image: none !important;
}

/* Sidebery */
#main-window[titlepreface*="[S] "] .tabbrowser-tab {
visibility: collapse;
}

#main-window[titlepreface*="[S] "] .titlebar-button {
height: 40px;
}

#main-window[titlepreface*="[S] "] #nav-bar {
margin-top: -40px;
}
#main-window[titlepreface*="[S] "][tabsintitlebar="true"] #nav-bar {
margin-right: 137px;
}
#main-window[titlepreface*="[S] "] #titlebar-spacer {
background-color: var(--chrome-secondary-background-color);
}

#main-window[titlepreface*="[S] "] #titlebar-buttonbox-container {
background-color: var(--chrome-secondary-background-color);
}

#main-window[titlepreface*="[S] "] .titlebar-color {
background-color: var(--toolbar-bgcolor);
}

#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"] #sidebar-header {
visibility: collapse;
}

/* Show sidebar only when the cursor is over it */
/* The border controlling sidebar width will be removed so you'll need to modify these values to change width */

#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"] {
--uc-sidebar-width: 47px;
--uc-sidebar-hover-width: 232px;
--uc-autohide-sidebar-delay: 500ms; /* Wait 0.6s before hiding sidebar */
position: relative;
min-width: var(--uc-sidebar-width) !important;
width: var(--uc-sidebar-width) !important;
max-width: var(--uc-sidebar-width) !important;
z-index:1;
margin-top: -1px;
}

#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"][positionend] {
direction: rtl;
}
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"][positionend] > *{
direction: ltr;
}

#sidebar-box[positionend]:-moz-locale-dir(rtl){
direction: ltr;
}
#sidebar-box[positionend]:-moz-locale-dir(rtl) > *{
direction: rtl;
}

#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"] > #sidebar {
transition: min-width 115ms linear !important;
min-width: var(--uc-sidebar-width) !important;
will-change: min-width;
}

#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:hover > #sidebar {
min-width: var(--uc-sidebar-hover-width) !important;
transition: min-width 100ms linear var(--uc-autohide-sidebar-delay), box-shadow 500ms linear !important;
box-shadow: 0 0 4px rgba(10,10,10, .5);
clip-path: inset(0px -15px 0px -15px);
}

/* Add sidebar divider and give it background */

#sidebar,
#sidebar-header {
background-color: var(--toolbar-bgcolor) !important;
border-inline: 1px solid var(--chrome-content-separator-color);
border-inline-width: 0px 1px;
}

#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:not([positionend]) > :-moz-locale-dir(rtl),
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"][positionend] > * {
border-inline-width: 1px 0px;
}

/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */

#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:not([positionend]):hover ~ #appcontent #statuspanel {
inset-inline: auto 0px !important;
}
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:not([positionend]):hover ~ #appcontent #statuspanel-label {
margin-inline: 0px !important;
border-left-style: solid !important;
}
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with vertical tabs enabled and compare normal versus compact density while hovering the min, max, and close buttons. Trace the SCSS rules controlling the titlebar buttons and hover areas; done means all three buttons are aligned and their hover effects fill the intended space in both modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
scss
Domain
design, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.