• Community
    • Community
    • Vivaldi Social
    • Blogs
  • Forum
    • Vivaldi Forum
    • Categories
    • Recent
    • Popular
  • Themes
    • Vivaldi Themes
    • My Themes
    • FAQ
  • Contribute
    • Contribute
    • Volunteer
    • Donate
  • Browser
    • Vivaldi Browser
    • Latest News
    • Snapshots
    • Help
Register Login

Vivaldi

  • Community
  • Themes
  • Contribute
  • Browser

Navigation

    • Home
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Desktop
    3. Customizations & Extensions
    4. Modifications
    5. [CSS] Auto-hide vertical tab bar?

    [CSS] Auto-hide vertical tab bar?

    Scheduled Pinned Locked Moved Modifications
    12 Posts 4 Posters 640 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      brakck29u491
      last edited by

      Hello folks. I'm not experienced with CSS and have been searching the net for a while without much luck.

      I'm looking for CSS to auto-hide the tab bar when it's in vertical view (Left or Right instead of Top). I found code to hide only horizontal tab bars.

      Any pointers would be appreciated 🙂

      For context I work on a small 13" macbook whilst mobile, I struggle with productivity and ability to focus when too many things are on the screen. So I try to optimize where possible. I use the tab bar constantly, so it's not convenient to toggle it on and off with keyboard shortcut every second or two

      mib2berlin
      M
      1 Reply Last reply
      Reply Quote 0
    • W
      Wyverns
      last edited by

      This will have to be a .js file if you want it to hide the vertical tab bar (css is for purely appearance; to make the vertical tab bar hide after some time / interaction you need to detect that using Javascript) + integration with keyboard shortcuts.

      If you want a CSS version that I'm pretty sure doesn't work with keyboard shortcuts, but does work with the sidebar: https://forum.vivaldi.net/topic/108251/rounded-tabs-auto-hide-side-panel-in-vivaldi-custom-css-all-window-sizes-supported/13

      Are you comfortable installing scripts? If so, I can try.

      B
      1 Reply Last reply
      Reply Quote 0
    • mib2berlin
      M
      mib2berlin Soprano @brakck29u491
      last edited by

      @brakck29u491
      Hi, you can search in the modification section only to get results only for modifications.

      1e990b95-c4f4-4920-85bc-4b88652f2d3b-image.png

      But I know this one and could find it quickly:

      https://forum.vivaldi.net/topic/107983/fixed-arc-like-ui?_=1749222468418

      Opensuse Tumbleweed x86_64 KDE 6.3 X11, Windows 11 Pro, Vivaldi latest
      HP Probook Intel(R) i5-8350U 16 GB, GPU UHD 620, SSD 256 GB
      Miniforum-B550 AMD Ryzen 7 4700G 16 GB, Radeon Graphics
      Redmi Note 14, HyperOS Android 14

      B
      1 Reply Last reply
      Reply Quote 1
    • B
      brakck29u491 @Wyverns
      last edited by

      @Wyverns Thanks for the explanation. Yes JS would be fine too.

      Btw I'm using CSS from this forum that auto-hides the panel, is the tab bar technically different and thus needs JS?

      1 Reply Last reply Reply Quote 0
    • sjudenim
      S
      sjudenim Supporters
      last edited by

      This can be done with just css and there are many examples already on this forum.

      Here's a basic auto hide that is triggered when you put your cursor to the tab bar side. It has an animation and a delay time that you can adjust to your liking.

      .tabs-left #main { margin-left: 0; }
      
      .tabs-right #main { margin-right: 0; }
        
      #tabs-tabbar-container.left, #tabs-tabbar-container.right {
        position: absolute;
        z-index: 1;
        height: 100%;
        transition: transform .3s .3s !important
      }
        
      #tabs-tabbar-container.left::after, #tabs-tabbar-container.right::before {
        content: '';
        display: block;
        position: absolute;
        background-color: transparent;
        height: 100%;
        width: 8px
      }
        
      #tabs-tabbar-container.left::after { margin-left: 100%; }
        
      #tabs-tabbar-container.right::before { margin-left: -8px; }
        
      #tabs-tabbar-container.left:not(:hover) { transform: translateX(-100%); transition: transform .7s .7s !important }
        
      #tabs-tabbar-container.right { right: 0; }
        
      #tabs-tabbar-container.right:not(:hover) { transform: translateX(100%); transition: transform .7s .7s !important }
      

      There are also built in options. You can use a mouse gesture and/or a keyboard shortcut to toggle the tab bar or if you prefer you can create a toggle button by creating a command chain and then add that button to any toolbar.

      https://github.com/sjudenim

      W
      B
      2 Replies Last reply
      Reply Quote 2
    • W
      Wyverns @sjudenim
      last edited by

      @sjudenim Oh nice, I didn't think of that. I forgot delays existed; these days CSS is really powerful. Thanks!

      1 Reply Last reply Reply Quote 0
    • B
      brakck29u491 @mib2berlin
      last edited by

      @mib2berlin ty very much. I tried the code but it didn't work, it just caused the tabs to dissapear😅

      mib2berlin
      M
      1 Reply Last reply
      Reply Quote 1
    • B
      brakck29u491 @sjudenim
      last edited by

      @sjudenim said in [CSS] Auto-hide vertical tab bar?:

      This can be done with just css and there are many examples already on this forum.

      Here's a basic auto hide that is triggered when you put your cursor to the tab bar side. It has an animation and a delay time that you can adjust to your liking.

      .tabs-left #main { margin-left: 0; }
      
      .tabs-right #main { margin-right: 0; }
        
      #tabs-tabbar-container.left, #tabs-tabbar-container.right {
        position: absolute;
        z-index: 1;
        height: 100%;
        transition: transform .3s .3s !important
      }
        
      #tabs-tabbar-container.left::after, #tabs-tabbar-container.right::before {
        content: '';
        display: block;
        position: absolute;
        background-color: transparent;
        height: 100%;
        width: 8px
      }
        
      #tabs-tabbar-container.left::after { margin-left: 100%; }
        
      #tabs-tabbar-container.right::before { margin-left: -8px; }
        
      #tabs-tabbar-container.left:not(:hover) { transform: translateX(-100%); transition: transform .7s .7s !important }
        
      #tabs-tabbar-container.right { right: 0; }
        
      #tabs-tabbar-container.right:not(:hover) { transform: translateX(100%); transition: transform .7s .7s !important }
      

      There are also built in options. You can use a mouse gesture and/or a keyboard shortcut to toggle the tab bar or if you prefer you can create a toggle button by creating a command chain and then add that button to any toolbar.

      WOW thanks so much for this code!!! I wish I knew this was possible 2 years ago when I moved to Vivaldi 🙂

      Just one thing, is it possible to have it correctly handle "Show workspaces in tab bar" setting?
      Currently a big rectangle placeholder remains on the screen underneath the auto-hidden tabs

      sjudenim
      S
      1 Reply Last reply
      Reply Quote 0
    • mib2berlin
      M
      mib2berlin Soprano @brakck29u491
      last edited by

      @brakck29u491
      I guess a Vivaldi update break it, was working for me as I tested it.
      This can always happen with mods if the modder don't have the time to update or lost interest.

      Opensuse Tumbleweed x86_64 KDE 6.3 X11, Windows 11 Pro, Vivaldi latest
      HP Probook Intel(R) i5-8350U 16 GB, GPU UHD 620, SSD 256 GB
      Miniforum-B550 AMD Ryzen 7 4700G 16 GB, Radeon Graphics
      Redmi Note 14, HyperOS Android 14

      B
      1 Reply Last reply
      Reply Quote 1
    • B
      brakck29u491 @mib2berlin
      last edited by

      @mib2berlin Fair enough, that's good to know. I need to learn some modern CSS I guess. It changed so much from the time I last used it, like 10 years ago lol. but chatGPT helped me understand it hehe

      1 Reply Last reply Reply Quote 1
    • sjudenim
      S
      sjudenim Supporters @brakck29u491
      last edited by

      @brakck29u491

      So here's the thing, that Workspace button has it's own container in the Stable (7.4), but (and this is a big but) it will be obsoleted in the very next release (7.5). The Workspace will be just another customizable button in the new builds and you will be able to add it directly to the tab bar (I think it's defaulted there but you can also add it to any other toolbar) therefore not needing it's own container.

      It can be done with just css but would be a little messy. Java would be cleaner to move it but that script will be useless in the next build.

      So rather than write that up I would suggest just using a mouse gesture(or keyboard shortcut) for the Tab Bar in the meantime

      https://github.com/sjudenim

      B
      1 Reply Last reply
      Reply Quote 1
    • B
      brakck29u491 @sjudenim
      last edited by brakck29u491

      @sjudenim aah thanks so much for the detailed explanation, that makes sense!
      Cool for now I disabled the workspace selector on the tab bar, in order to use the nice auto-hide code.
      Then I added a workspace selector button to the side panel. I eagerly await release 7.5 to add it back to tab bar 🙂

      Have a nice Sunday!

      1 Reply Last reply Reply Quote 1
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    • 1 / 1
    • First post
      Last post

    Copyright © Vivaldi Technologies™ — All rights reserved. Privacy Policy | Code of conduct | Terms of use | Vivaldi Status