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

Hover-expand tab bar with translucent theme colors #2554

Closed
4 tasks done
KZDKM opened this issue Nov 1, 2024 · 1 comment
Closed
4 tasks done

Hover-expand tab bar with translucent theme colors #2554

KZDKM opened this issue Nov 1, 2024 · 1 comment

Comments

@KZDKM
Copy link

KZDKM commented Nov 1, 2024

Captchas

  • I have read the instructions.
  • I have searched existing issues and avoided creating duplicates.
  • I am not filing an enhancement request.

What happened?

The newly added theme color option supports setting translucent theme colors, but when expand-on-hover is enabled for the vertical tab bar, the background expanded tab panel is also translucent, this greatly reduces the readability of tabs.

The following userChrome snippet fixes the issue:

#navigator-toolbox[zen-user-hover="true"][zen-has-hover="true"] {
  #TabsToolbar{
    /*ignores the alpha channel of the background and make panel opaque*/
    /*background: rgb(from var(--zen-main-browser-background) r g b / 1) !important;*/

    /*keep the panel translucent but add blur behind it*/
    backdrop-filter: blur(10px);
  }
}

Additionally, the opaque theme color could also be set to the background of browserContainers to avoid pages temporarily becoming completely transparent when loading.

.browserContainer {
  background: rgb(from var(--zen-main-browser-background) r g b / 1) !important;
}

Reproducible?

  • I have checked that this issue cannot be reproduced on Mozilla Firefox.

Version

1.0.1

What platform are you seeing the problem on?

Linux

Relevant log output

No response

Copy link

dosubot bot commented Nov 1, 2024

Hey @KZDKM! I'm here to help you with any bugs, questions, or contributions. Let me know how I can assist you!

The issue you're experiencing with the translucent theme colors affecting readability when the expand-on-hover feature is enabled can be addressed with the provided userChrome CSS snippet. This snippet effectively enhances readability by applying a blur effect to the background of the expanded tab panel, which maintains translucency while improving text visibility. Additionally, setting an opaque background for browserContainers can prevent transparency issues during page loading.

Here's a summary of the solution:

  1. For the Tab Bar:

    • Apply a blur effect to the background of the expanded tab panel to enhance readability while keeping the translucency:
    #navigator-toolbox[zen-user-hover="true"][zen-has-hover="true"] {
      #TabsToolbar {
        backdrop-filter: blur(10px);
      }
    }
  2. For Browser Containers:

    • Set an opaque background to prevent transparency during page loading:
    .browserContainer {
      background: rgb(from var(--zen-main-browser-background) r g b / 1) !important;
    }

These adjustments should help maintain the aesthetic of the translucent theme while ensuring that the UI remains functional and readable.

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Dec 2, 2024
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 9, 2024
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant