Skip to content

Instantly share code, notes, and snippets.

@robertkruis
Created April 8, 2021 00:03
Show Gist options
  • Save robertkruis/79da23fb8ea8202e8c2f8da91a5d55b6 to your computer and use it in GitHub Desktop.
Save robertkruis/79da23fb8ea8202e8c2f8da91a5d55b6 to your computer and use it in GitHub Desktop.
Vivaldi Edge Vertical Style Tabs - Customized
/*
Author: t. Macleod Sawyer (@Drannex42)
Version: 1.2.8
Description: The following file attempts to recreate (and heavily improve!) the Microsoft Edge style vertical tabs (that are currently in very limited alpha release) in the Vivaldi browser. I spent about four or so hours on this.
URL: https://github.com/drannex42/vivaldi-mods/blob/master/edge_style_vertical_tabs.css
*/
/* Update Log
v1.0.1-1.1.0: Fixed tab positioning, roundness, notification icons, audio icons, improved theme colouring, tab overflow, scrolling, vivaldi/menu icons, and many other.
v1.1.1: Added tab thumbnails (when enabled in settings) and the appropriate tab positions.
v1.1.2: Fixed favicon svg on internal pages on light themes.
v1.1.3: Fixes the coloring on the close buttons, no longer attached to the accent of the window, but on the foreground lightest color. This tends to be far less jarring.
v1.1.4: Added hibernate (.isdiscarded) class (dims tab - if you change this option in settings, browser restart required), added unread tab indicator. Thanks @Ararararagi for pointing out these needed features!
v1.1.5: Minor update, notification badge has better positioning and padding.
v1.1.6: Fixed fullscreen bug on some monitors as reported by /u/Tsopek on reddit, also added label to the synced tags button on the toolbar, fixed the overflow overlay, and the overflow scrollbar appearing in some cases when not hovered.
v1.1.7: Removed absolute positioning on tabs, and made the new tab button sticky to the bottom of the overflow tab container!
v1.1.8: Realigned new tab button to be alongside the trash and sync buttons (when tab overflow happens), added config section below, fixed trash & sync svg sizes
v1.1.9: Fixed tab stack visual (better alignment of tab indicators).
v1.2.1: Updates for latest vivaldi snapshot changes: added styling for additional tabbar container, readded border width, added removal of the new tab bar container width, fixed sync and trash container from being offset.
v1.2.2: Flipped the close button and the favicon for users who use this on the right side of the screen.
v1.2.3: Updated tab selection svg size/border as latest vivaldi changed how they handled tab selections .
v1.2.4: Fixed new tab position and sync and trash container config
v1.2.5: Latest Vivaldi Snapshop updates added a new transform property to the tab position class, I have removed that and added an importance tag to the new tab button to override.
v1.2.6: Removed config settings, as they are no longer needed!
v1.2.7: Made future editing easier, by forcing the tab width to the size of the tab-container.
v1.2.8: Latest versions of vivaldi added a new container to the tab-bar, this removes it (in a way) and allows for panels to be resized again.
*/
.tabs-left #main {
margin-left: 50px;
}
.tabs-right #main {
margin-right: 50px;
}
#browser.fullscreen #main {
margin-left: 0 !important;
margin-right: 0 !important;
}
.topmenu .horizontal-menu-pagetitle {
position: absolute;
width: 100%;
z-index: 1;
margin-top: 8px;
}
.topmenu .menubar.horizontal {
background: var(--colorBg);
z-index: 99999 !important;
}
.tabs-right #header .window-buttongroup {
margin-right: 50px;
z-index: 99 !important;
}
#titlebar .window-buttongroup {
z-index: 99999;
}
.tabs-right .UrlBar {
padding-right: 2px;
}
#main .inner {
position: relative;
}
.tabs-left #browser:not(.tabs-top) .vivaldi {
height: 30px;
padding: 0;
margin-left: 8px;
padding-bottom: 10px !important;
margin-top: 5px !important;
z-index: 99999999;
}
.tabs-left .vivaldi {
padding-left: 15px !important;
height: 30px !important;
z-index: 999 !important;
}
.tabs-left .topmenu button.vivaldi-horizontal-icon {
z-index: 999;
padding-right: 15px;
padding-left: 7px;
}
.tabs-left .topmenu button.vivaldi-horizontal-icon svg {
width: 20px;
height: 20px;
margin-left: 7.5px;
}
#tabs-container {
border-color: var(--colorBgDarker) !important;
border-width: 1px;
z-index: 99999999 !important;
}
#tabs-tabbar-container {
width: 0 !important;
position: fixed;
top: 0;
height: 100%;
z-index: 99999999;
}
#tabs-tabbar-container.left {
left: 0;
}
#tabs-tabbar-container.right {
right: 0;
}
.tabs-left.application-icon {
position: fixed;
left: 0;
top: 0;
background: var(--colorBg);
padding: 14px;
padding-top: 6px;
}
.tabs-left .color-behind-tabs-off .topmenu button.vivaldi-horizontal-icon span.application-icon {
display: block;
padding-left: 7px !important;
padding-bottom: 0;
}
.tabs-left .color-behind-tabs-off .topmenu .menubar.horizontal {
margin-left: 30px;
}
#tabs-container {
z-index: 9 !Important;
}
#tabs-container.left:hover,
#tabs-container.right:hover {
position: fixed;
left: 0;
z-index: 9999999;
color: var(--colorFg) !important;
background-color: var(--colorBg);
height: 100%;
top: 0;
width: 250px !important;
padding-top: 25px;
}
#tabs-container.right:hover {
right: 0px !important;
left: auto !important;
}
#tabs-container.right .button-toolbar.newtab {
flex-direction: row-reverse;
text-align: right;
}
#tabs-container.right .tab-header {
flex-direction: row-reverse;
}
#tabs-container.left:not(:hover),
#tabs-container.right:not(:hover) {
width: 50px !important;
height: 100%;
position: fixed;
background-color: var(--colorBg);
top: 0;
left: 0;
padding-top: 25px;
}
#tabs-container.right:not(:hover) {
right: 0px !important;
left: auto !important;
}
#tabs-container.left {
left: 0;
}
#tabs-container.right {
right: 0;
}
.tab-strip {
max-height: calc(100%);
display: block;
margin-bottom: 50px;
padding: 10px !important;
overflow-y: overlay !important;
}
#tabs-container:not(:hover) .tab-strip{
overflow: hidden !important;
}
.tab-position {
position: absolute;
max-height: 100%;
max-width: 100%;
width: 100% !important;
display: flex;
height: auto !important;
position: relative !important;
overflow: visible !important;
top: auto !important;
margin-bottom: 30px;
transform: none !important;
}
.tab-position .tab {
max-height: 100%;
max-width: 100%;
display: flex;
padding: 5px !important;
border: 1px solid transparent !important;
border-radius: calc(var(--radius)) !important;
height: auto !important;
position: relative !important;
overflow: visible !important;
margin: inherit !important;
margin-bottom: -24px !important;
font-size: 13px;
background: none !important;
}
.tab-position .tab:hover {
background: var(--colorBgDarker) !important;
color: inherit !important;
}
.tab-position .tab.active {
background-color: var(--colorBgLighter) !important;
color: var(--colorFg) !important;
border: 1px solid var(--colorBgDarker) !important;
box-shadow: 0px 5px 10px var(--colorBgDarker) !important;
}
#browser:not(.ui-transparent-tabs) .tab-position .tab:hover:not(.active) {
background-color: var(--colorBgDarker);
}
.tab-position .tab .tab-header {
padding: 0 !important;
flex: none !Important;
}
.tab-position .tab .favicon {
pointer-events: none;
flex: 0 0 18px;
border-radius: var(--radiusRounded);
min-width: 20px;
padding: 1px;
filter: unset;
color: var(--colorFg);
text-align: center;
}
.tab-position .tab .favicon svg {
width: 16px;
height: 16px;
}
.theme-dark .tab-position .tab.active .tab-header .favicon:not(.svg) {
filter: none !important;
}
.tab-position .tab .title {
-webkit-mask-image: -webkit-linear-gradient(180deg, transparent 0, var(--colorBg) 25px);
-webkit-mask-position: right;
margin-top: -2px;
padding-left: 8px;
}
.tab-strip .tab-position-of-type {
margin-bottom: 40px;
}
#browser:not(.alt-tabs) #tabs-container .close {
margin-right: 6px;
margin: 0;
margin-top: 1px;
}
.tab-position .tab .close svg {
margin: auto;
color: var(--colorFgFadedMost);
}
.tab-position .tab .close svg:hover {
color: var(--colorFg);
}
.tab-position .tab .close {
display: flex;
background: none;
}
#tabs-container .tab.isdiscarded .favicon {
filter: none;
}
.toolbar-tabbar > .button-toolbar > button {
color: var(--colorFg);
}
.button-toolbar.newtab {
border-top: 1px solid var(--colorBgDarker);
padding-top: 5px !important;
left: 0 !important;
flex: none !important;
display: inline-block !important;
width: 100% !important;
top: auto !important;
}
.button-toolbar.newtab button {
width: 100%;
}
.resize .tab-strip .toolbar-tabbar {
z-index: 999999;
background: var(--colorBg);
position: sticky !important;
bottom: -30px;
padding-bottom: 20px;
}
}
.toolbar-tabbar .newtab > button {
width: 100%;
}
.toolbar-tabbar .newtab > button::hover {
cursor: pointer;
}
.toolbar-tabbar .newtab > button svg {
height: 30px;
width: 30px;
}
#tabs-container:hover .toolbar-tabbar .newtab > button::after {
content: "New Tab";
display: inline-block;
width: 100%;
margin-top: 0px;
padding-left: 5px;
}
.bookmark-bar {
padding-left: 4px;
}
.sync-and-trash-container {
width: 100%;
position: sticky;
bottom: 0px;
padding: 11px;
text-align: left;
justify-content: left !important;
padding-bottom: 5px;
margin-top: 14px !important;
max-width: 100% !important;
}
#tabs-container:hover .sync-and-trash-container {
padding-right: 0;
}
.synced-tabs-button {
display: block;
width: 100%;
margin-bottom: -2px;
}
.sync-and-trash-container .toggle-trash button span svg {
height: 29px;
width: 28px;
}
.sync-and-trash-container .synced-tabs-button button span svg {
height: 29px;
width: 28px;
}
#tabs-container:hover .sync-and-trash-container .toggle-trash button span::after {
content: "Trash";
display: inline-block;
margin-top: 7px;
padding-left: 8px;
cursor: pointer;
}
#tabs-container:hover .sync-and-trash-container .synced-tabs-button span::after {
content: "Sync";
display: inline-block;
margin-top: 7px;
padding-left: 8px;
cursor: pointer;
}
.tab-audio {
left: 4px !important;
transform: scale(0.45) !important;
bottom: -2px;
}
.tab .button-badge {
top: 2px;
right: auto;
left: 15px;
font-size: 12px;
transform: scale(0.75);
padding: 0px !important;
border-radius: var(--radiusRound);
position: fixed;
padding-bottom: 3px !important;
}
.tab-position .tab .tab-selection {
position: absolute;
pointer-events: none;
border-radius: var(--radiusHalf);
top: 0px;
z-index: 999999;
left: 0px;
}
.svg-tab-selection {
margin-top: -5px;
margin-left: -5px;
}
.tab-position .tab.isdiscarded {
filter: brightness(.8) contrast(.8) opacity(0.65);
}
#tabs-container.view-thumbs .tab-strip .thumbnail-image {
display: none !important;
}
#tabs-container.view-thumbs:hover .tab-strip .thumbnail-image {
margin-top: 5px !important;
display: block !Important;
}
#browser:not(.alt-tabs) #tabs-container .tab:not(.pinned):not(.tab-small).audio-on .favicon, #browser:not(.alt-tabs) #tabs-container .tab:not(.pinned):not(.tab-small).audio-muted .favicon, #browser:not(.alt-tabs) #tabs-container .tab:not(.pinned):not(.tab-small).tab-captured .favicon {
transform: none !important;
}
/*
Drop-Down Tab Stacks based on LonM.vivaldi.net (but heavily modified)
*/
.tab-group-indicator {
width: 100%;
}
#tab-container:not(:hover) .tab-group-indicator .tab-indicator {
margin-right: 1px !important;
margin-left: 1px !important;
}
.tab-group-indicator div:last-of-type {
margin-right: -2px !important;
}
.tab-group-indicator div:first-of-type {
margin-left: -1px !important;
}
/* Make the tab group indicator vertical below tab header */
.tab-group:hover .tab-group-indicator {
flex-direction: column;
position: relative;
}
/* Space tab indicators vertically */
.tab-group:hover .tab-indicator {
height: 30px !important;
margin-top: 2px;
flex: none !important;
top: -26px;
border: none !important;
}
/* Background (shape) of tab indicator */
.tab-group:hover .tab-indicator:before {
content: '';
background: var(--colorBgInverser);
display: flex;
height: 23px;
width: 100%;
border-radius: var(--radiusHalf);
}
.tab-group:hover .tab-indicator.active:before {
background: var(--colorAccentBg);
}
/* Foreground (text) of tab indicator */
.tab-group:hover .tab-indicator:after {
content: attr(title);
display: block;
width: 90%;
position: relative;
top: -20px;
left: 8px;
color: var(--colorFg);
white-space: nowrap;
overflow: hidden;
/** Toggle for fade out long text */
-webkit-mask-image: -webkit-linear-gradient(180deg, transparent 0, #fff 16px);
-webkit-mask-position: top right;
/* or clip with ... */
/*text-overflow: ellipsis;*/
}
.tab-group:hover .tab-indicator {
background: transparent !important;
cursor: pointer;
}
/* Highlight Currently selected tab group indicator */
.tab-group:hover .tab-indicator.active {
height: 26px;
width: 100%;
border-bottom: none !important;
border-radius: var(--radiusHalf);
background: transparent !important;
}
/* Change active indicator colours */
.tab-group:hover .tab-indicator:hover:before {
background: var(--colorAccentBg);
}
.tab-group:hover .tab-indicator:hover:after {
color: var(--colorHighlightFg);
}
/* different tab positions */
.tabs-right .tab-group:hover .tab-group-indicator,
.tabs-left .tab-group:hover .tab-group-indicator{
top: 30px !important;
bottom: unset !important;
}
.tabs-right .tab-group:hover .tab-group-indicator:before,
.tabs-left .tab-group:hover .tab-group-indicator:before{
top: 0;
}
.tabs-top .tab-group:hover .tab-group-indicator{
top: 26px !important;
bottom: unset !important;
left: -6px;
}
.tabs-top .tab-group:hover .tab-group-indicator:before {
top: -30px;
bottom: unset !important;
left: 6px;
width: calc(100% - 10px);
}
.tabs-bottom .tab-group:hover .tab-group-indicator{
top: unset !important;
bottom: 26px !important;
}
.tabs-bottom .tab-group:hover .tab-group-indicator:before {
top: unset !important;
bottom: -30px;
}
/* Prevent side tabs z-index upsetting the
layering of the tab group indicators */
.tabs-right .tab-position:hover,
.tabs-left .tab-position:hover {
z-index: 3 !important;
}
.tab-indicator {
flex: 1 1 100%;
border-top: 3px solid transparent;
border-bottom: none;
background-clip: content-box;
position: relative;
margin: 0 1px !important;
border-color: #ccc;
height: 2px !important;
top: -1px;
}
.tab-position .tab.unread {
background-image: linear-gradient(-135deg, var(--colorBorderIntense) 5px, transparent 5px) !important;
background-position: top right !important;
background-repeat: no-repeat !important;
}
/* customization (align with bottom of the address bar) */
#tabs-tabbar-container {
top: unset !important;
}
#tabs-container.left:not(:hover),
#tabs-container.right:not(:hover),
#tabs-container.left:hover,
#tabs-container.right:hover {
padding-top: 0 !important;
}
.tabs-left #main {
margin-left: 0px !important;
}
.tabs-right #main {
margin-right: 0px !important;
}
.tabs-right #header .window-buttongroup {
margin-right: 0 !important;
}
.tabs-left #main .inner {
margin-left: 50px !important;
}
.tabs-right #main .inner {
margin-right: 50px !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment