Equicord/src/equicordplugins/channelTabs/style.css
Wes 6096013c65
feat(ChannelTabs): Improves tab management/behaviour (#285)
* basically instead of changing the current tab:
  -if there is a tab for that channel: swap to the channel tab
  -if there isnt a tab for that channel it creates a new one
  -there is a 3 second (you can change it in settings) grace period for when you are quickly switching tabs so your tabs dont get filled

also added background (and border to the active tab) to the tabs so it works better with custom themes that have image backgrounds

* made the improvements settings

* better regex (ty thororen)

* Update style.css

---------

Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com>
2025-06-11 16:47:52 -04:00

266 lines
5.3 KiB
CSS

.vc-channeltabs-icon {
height: 1.5rem;
width: 1.5rem;
border-radius: 50%;
}
.vc-channeltabs-guild-acronym-icon {
height: 1.25rem;
width: 1.5rem;
min-width: 1.5rem;
border-radius: 50%;
padding-top: 0.25rem;
background-color: var(--background-primary);
overflow: hidden;
}
/* user avatars */
.vc-channeltabs-tab [class^="wrapper_"] {
min-width: 1.5rem;
}
.vc-channeltabs-name-text {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-left: 0.125rem;
}
.vc-channeltabs-tab-inner {
border-radius: 0.5rem;
padding: 0.25rem 0 0.25rem 0.25rem;
display: flex;
flex-direction: row;
align-items: center;
gap: 0.25rem;
}
.vc-channeltabs-tab-container,
.vc-channeltabs-bookmark-container {
display: flex;
flex-direction: row;
align-items: flex-start;
}
.platform-osx .vc-channeltabs-tab-container {
padding-left: 66px;
}
.vc-channeltabs-container {
--channeltabs-red: #f23f42;
--channeltabs-blue: #0052b6;
--channeltabs-yellow: #f0b132;
--channeltabs-green: #24934f;
--channeltabs-black: #000;
--channeltabs-white: #fff;
--channeltabs-orange: #e67e22;
--channeltabs-pink: #ff73fa;
padding: 0.35rem;
display: flex;
flex-direction: column;
}
.vc-channeltabs-separator {
width: 98vw;
height: 0.075rem;
background: var(--bg-overlay-5);
background-color: var(--background-secondary);
margin: 0.25rem 1vw;
}
.vc-channeltabs-scroller {
display: flex;
flex-direction: row;
align-items: flex-start;
overflow-x: auto;
white-space: nowrap;
}
.vc-channeltabs-scroller::-webkit-scrollbar {
display: none;
}
.vc-channeltabs-bookmarks {
flex-grow: 1;
overflow: hidden;
}
.vc-channeltabs-bookmark-placeholder-text {
color: var(--text-muted);
padding: 0.25rem 0 0 0.25rem;
}
.vc-channeltabs-bookmark-star {
fill: none;
stroke: var(--text-muted);
stroke-width: 0.075rem;
}
.vc-channeltabs-bookmark-star-checked {
fill: var(--yellow-300);
}
.vc-channeltabs-bookmark {
display: flex;
flex-direction: row;
max-width: 8rem;
padding: 0.25rem 0.5rem;
border-radius: 0.25rem;
}
.vc-channeltabs-bookmark.vc-channeltabs-wider {
max-width: 12rem;
}
.vc-channeltabs-bookmark .vc-channeltabs-name-text {
margin-left: 0.25rem;
margin-right: 0.25rem;
}
.vc-channeltabs-bookmark-icon {
height: 1rem;
width: 1rem;
border-radius: 50%;
background-color: var(--background-primary);
text-align: center;
}
.vc-channeltabs-bookmark-notification {
height: 1rem;
width: 1rem;
}
.vc-channeltabs-channel-info {
flex-grow: 1;
overflow: hidden;
}
.vc-channeltabs-tab {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
border-radius: 0.25rem;
width: 12rem;
min-width: 0;
margin-right: 0.25rem;
background-color: var(--background-primary);
border: 1px solid var(--background-modifier-accent);
transition: background-color 0.15s ease;
}
.vc-channeltabs-tab.vc-channeltabs-wider:not(.vc-channeltabs-tab-compact) {
width: 16rem;
}
.vc-channeltabs-tab-compact {
width: unset;
min-width: unset;
}
.vc-channeltabs-tab-selected {
background: var(--bg-overlay-selected);
background-color: var(--background-modifier-selected);
border-color: var(--brand-500);
}
/* channel type container */
.vc-channeltabs-container [class^="iconContainer_"] {
margin: 0 -0.25rem 0 0;
pointer-events: none;
height: 1rem;
transform: scale(0.8);
}
.vc-channeltabs-ghost-tab {
visibility: hidden;
}
.vc-channeltabs-hoverable:hover,
.vc-channeltabs-tab:hover:not(.vc-channeltabs-tab-selected) {
background: var(--bg-overlay-hover);
background-color: var(--background-modifier-hover);
}
.vc-channeltabs-button {
background-color: transparent;
color: var(--text-normal);
}
.vc-channeltabs-new-button {
padding: 0.375rem 0.5rem;
border-radius: 0.25rem;
}
.vc-channeltabs-close-button {
height: 1rem;
padding: 0;
margin-right: 0.5rem;
}
.vc-channeltabs-close-button-compact {
position: absolute;
opacity: 0;
width: 2rem;
height: 2rem;
margin-left: 0.35rem;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
}
.vc-channeltabs-close-button-compact:hover {
background-color: black;
opacity: 0.5;
}
.vc-channeltabs-emoji-container {
display: flex;
align-items: center;
justify-content: center;
height: 1.25rem;
width: 1.25rem;
min-width: 1.25rem;
border-radius: 50%;
}
.vc-channeltabs-emoji {
height: 0.75rem;
width: 0.75rem;
}
.vc-channeltabs-favorites-star {
margin: 0 -0.25rem -1rem -0.75rem;
height: 0.75rem;
width: 0.75rem;
}
.vc-channeltabs-preview-tab {
display: flex;
flex-direction: row;
align-items: center;
width: 12rem;
padding: 0.125rem 0;
min-width: 0;
border-radius: 0.25rem;
border: 1px solid var(--background-modifier-accent);
}
.vc-channeltabs-preview-tab-compact {
width: unset;
min-width: unset;
}
.vc-channeltabs-preview-tab> :is(.vc-channeltabs-emoji-container,
.vc-channeltabs-typing-indicator,
[data-has-mention]) {
display: none;
}
.vc-channeltabs-preview-text {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}