Merge pull request #1467 from philmard/main

Update Theme: Tab Numbers (v1.0.6)
This commit is contained in:
mr. m 2025-05-14 21:07:03 +02:00 committed by GitHub
commit f687f94133
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 160 additions and 148 deletions

View file

@ -1,12 +1,74 @@
#vertical-pinned-tabs-container > .zen-workspace-tabs-section[hidden="true"] {
#vertical-pinned-tabs-container > .zen-workspace-tabs-section[hidden="true"] { display: none !important;
display: none !important; }
tabs {
counter-reset: tab-counter;
} /* Automatically increment tab numbers for each .tab-content inside a tab */ /* Styles when the sidebar is expanded */
@media (-moz-bool-pref: "zen.view.sidebar-expanded") {
.zen-workspace-tabs-section[active="true"]
tab:not([zen-glance-tab="true"])
> .tab-stack
> .tab-content::after {
counter-increment: tab-counter;
content: counter(
tab-counter
); /* Space before the number */ /* Positioning and styling */
font-weight: var(--bold-text, normal);
font-size: var(--font_size, 80%);
color: var(--number_color, inherit);
z-index: -100; /* Background and shape for the number */
display: inline-block;
background-color: var(
--number_background_color,
#717171d7
); /* Change to any color */
text-align: center;
width: 20px; /* Width of the circular background */
height: 20px; /* Height of the circular background */
line-height: 20px; /* Vertically center the number inside the circle */
border-radius: var(
--background_shape,
20%
); /* Default for Slightly Rounded Square */
margin-left: 3px;
margin-right: 3px; /* Changed to 3px to align with the Close Button */
} }
tabs {
counter-reset: tab-counter; /* Hide the "X" close button by default */
} /* Automatically increment tab numbers for each .tab-content inside a tab */ /* Styles when the sidebar is expanded */ tab .tab-close-button {
@media (-moz-bool-pref: "zen.view.sidebar-expanded") { visibility: hidden;
opacity: 0;
/* In order to not hide the tab title. [Can't make this work. It still hides the title] */
/* Also, display: none; doesn't seem to work */
width: 0;
margin: 0;
}
/* Hide tab numbers on the right side when hovering over */
.zen-workspace-tabs-section
tab:not([zen-glance-tab="true"])
> .tab-stack
> .tab-content:hover::after {
opacity: 0; /* Make it invisible */
width: 0; /* In order to bring the close button to the right */
margin: 0;
}
/* Show the "X" close button on hover */
tab:hover .tab-close-button {
visibility: visible;
opacity: 1;
}
/* Put tab numbers on the left side when expanded_side="Left" (AND in expanded mode) */
:root:has(#theme-Tab-Numbers[uc-theme-expanded_side="Left"]) {
tab:not([zen-glance-tab="true"]) > .tab-stack > .tab-content::after { tab:not([zen-glance-tab="true"]) > .tab-stack > .tab-content::after {
display: none; /* Hide the ::after pseudo-element first */
}
.zen-workspace-tabs-section[active="true"]
tab:not([zen-glance-tab="true"])
> .tab-stack
> .tab-content::before {
counter-increment: tab-counter; counter-increment: tab-counter;
content: counter( content: counter(
tab-counter tab-counter
@ -18,8 +80,8 @@
display: inline-block; display: inline-block;
background-color: var( background-color: var(
--number_background_color, --number_background_color,
#717171d7 #888888
); /* Change to any color */ ); /* Default color is light grey */
text-align: center; text-align: center;
width: 20px; /* Width of the circular background */ width: 20px; /* Width of the circular background */
height: 20px; /* Height of the circular background */ height: 20px; /* Height of the circular background */
@ -29,71 +91,36 @@
20% 20%
); /* Default for Slightly Rounded Square */ ); /* Default for Slightly Rounded Square */
margin-left: 3px; margin-left: 3px;
margin-right: 3px; /* Changed to 3px to align with the Close Button */ margin-right: 5px;
} }
}
/* Hide the "X" close button by default */ } /* Styles when the sidebar is NOT expanded (compact mode) */
tab .tab-close-button { @media not (-moz-bool-pref: "zen.view.sidebar-expanded") {
visibility: hidden; .zen-workspace-tabs-section[active="true"]
opacity: 0; tab:not([zen-glance-tab="true"])
/* In order to not hide the tab title. [Can't make this work. It still hides the title] */ > .tab-stack
/* Also, display: none; doesn't seem to work */ > .tab-content::before {
width: 0; counter-increment: tab-counter;
margin: 0; content: counter(tab-counter) "";
} position: absolute;
top: 4px;
/* Hide tab numbers on the right side when hovering over */ right: 1px;
tab:not([zen-glance-tab="true"]) > .tab-stack > .tab-content:hover::after { padding: 0px 0px;
opacity: 0; /* Make it invisible */ z-index: -100;
width: 0; /* In order to bring the close button to the right */ font-weight: var(--bold-text, normal);
margin: 0; font-size: var(--font_size, 80%); /* Default font size (same as "Small") */
} color: var(--number_color, inherit); /* Fallback to default color */
} /* Put tab numbers on the left side when compact_side="Left" (AND in compact mode) */
/* Show the "X" close button on hover */ :root:has(#theme-Tab-Numbers[uc-theme-compact_side="Left"]) {
tab:hover .tab-close-button { .zen-workspace-tabs-section[active="true"]
visibility: visible; tab:not([zen-glance-tab="true"])
opacity: 1; > .tab-stack
} > .tab-content::before {
/* Put tab numbers on the left side when expanded_side="Left" (AND in expanded mode) */
:root:has(#theme-Tab-Numbers[uc-theme-expanded_side="Left"]) {
tab:not([zen-glance-tab="true"]) > .tab-stack > .tab-content::after {
display: none; /* Hide the ::after pseudo-element first */
}
tab:not([zen-glance-tab="true"]) > .tab-stack > .tab-content::before {
counter-increment: tab-counter;
content: counter(
tab-counter
); /* Space before the number */ /* Positioning and styling */
font-weight: var(--bold-text, normal);
font-size: var(--font_size, 80%);
color: var(--number_color, inherit);
z-index: -100; /* Background and shape for the number */
display: inline-block;
background-color: var(
--number_background_color,
#888888
); /* Default color is light grey */
text-align: center;
width: 20px; /* Width of the circular background */
height: 20px; /* Height of the circular background */
line-height: 20px; /* Vertically center the number inside the circle */
border-radius: var(
--background_shape,
20%
); /* Default for Slightly Rounded Square */
margin-left: 3px;
margin-right: 5px;
}
}
} /* Styles when the sidebar is NOT expanded (compact mode) */
@media not (-moz-bool-pref: "zen.view.sidebar-expanded") {
tab:not([zen-glance-tab="true"]) > .tab-stack > .tab-content::before {
counter-increment: tab-counter; counter-increment: tab-counter;
content: counter(tab-counter) ""; content: counter(tab-counter) "";
position: absolute; position: absolute;
top: 4px; top: 4px;
right: 1px; left: 1px;
padding: 0px 0px; padding: 0px 0px;
z-index: -100; z-index: -100;
font-weight: var(--bold-text, normal); font-weight: var(--bold-text, normal);
@ -102,69 +129,52 @@
80% 80%
); /* Default font size (same as "Small") */ ); /* Default font size (same as "Small") */
color: var(--number_color, inherit); /* Fallback to default color */ color: var(--number_color, inherit); /* Fallback to default color */
} /* Put tab numbers on the left side when compact_side="Left" (AND in compact mode) */
:root:has(#theme-Tab-Numbers[uc-theme-compact_side="Left"]) {
tab:not([zen-glance-tab="true"]) > .tab-stack > .tab-content::before {
counter-increment: tab-counter;
content: counter(tab-counter) "";
position: absolute;
top: 4px;
left: 1px;
padding: 0px 0px;
z-index: -100;
font-weight: var(--bold-text, normal);
font-size: var(
--font_size,
80%
); /* Default font size (same as "Small") */
color: var(--number_color, inherit); /* Fallback to default color */
}
}
} /* Enable bold text when the preference is enabled */
@media (-moz-bool-pref: "uc.theme.bold-text-enable.enabled") {
tab:not([zen-glance-tab="true"]) > .tab-stack > .tab-content {
--bold-text: bold;
} }
} }
@media (-moz-bool-pref: "uc.theme.custom_color_enabled") { } /* Enable bold text when the preference is enabled */
tab:not([zen-glance-tab="true"]) > .tab-stack > .tab-content { @media (-moz-bool-pref: "uc.theme.bold-text-enable.enabled") {
--number_color: var(--uc-theme-number_color) !important; tab:not([zen-glance-tab="true"]) > .tab-stack > .tab-content {
--number_background_color: var( --bold-text: bold;
--uc-theme-number_background_color
) !important;
}
} /* Set font size for Extra Small (Override default) */
:root:has(#theme-Tab-Numbers[uc-theme-font_size="XSmall"]) {
--font_size: 70% !important; /* Extra Small font size */
} /* Set font size for Small */
:root:has(#theme-Tab-Numbers[uc-theme-font_size="Small"]) {
--font_size: 80% !important; /* Small font size */
} /* Set font size for Medium (Override default) */
:root:has(#theme-Tab-Numbers[uc-theme-font_size="Medium"]) {
--font_size: 90% !important; /* Medium font size */
} /* Set font size for Large (Override default) */
:root:has(#theme-Tab-Numbers[uc-theme-font_size="Large"]) {
--font_size: 100% !important; /* Large font size */
} /* Set font size for Extra Large (Override default) */
:root:has(#theme-Tab-Numbers[uc-theme-font_size="XLarge"]) {
--font_size: 120% !important; /* Extra Large font size */
} /* Ensure Close X button is on top of everything. */
.tab-close-button {
z-index: 10;
} /* Customize the shape based on the preference values */
:root:has(#theme-Tab-Numbers[uc-theme-background_shape="Square"]) {
--background_shape: 0%; /* Square */
} }
:root:has(#theme-Tab-Numbers[uc-theme-background_shape="SlightlyRounded"]) { }
--background_shape: 5%; /* Slightly Rounded Square */ @media (-moz-bool-pref: "uc.theme.custom_color_enabled") {
tab:not([zen-glance-tab="true"]) > .tab-stack > .tab-content {
--number_color: var(--uc-theme-number_color) !important;
--number_background_color: var(
--uc-theme-number_background_color
) !important;
} }
:root:has(#theme-Tab-Numbers[uc-theme-background_shape="ModeratelyRounded"]) { } /* Set font size for Extra Small (Override default) */
--background_shape: 15%; /* Moderately Rounded Square */ :root:has(#theme-Tab-Numbers[uc-theme-font_size="XSmall"]) {
} --font_size: 70% !important; /* Extra Small font size */
:root:has(#theme-Tab-Numbers[uc-theme-background_shape="FullyRounded"]) { } /* Set font size for Small */
--background_shape: 30%; /* Fully Rounded Square */ :root:has(#theme-Tab-Numbers[uc-theme-font_size="Small"]) {
} --font_size: 80% !important; /* Small font size */
:root:has(#theme-Tab-Numbers[uc-theme-background_shape="Circle"]) { } /* Set font size for Medium (Override default) */
--background_shape: 50%; /* Perfect Circle */ :root:has(#theme-Tab-Numbers[uc-theme-font_size="Medium"]) {
} --font_size: 90% !important; /* Medium font size */
} /* Set font size for Large (Override default) */
:root:has(#theme-Tab-Numbers[uc-theme-font_size="Large"]) {
--font_size: 100% !important; /* Large font size */
} /* Set font size for Extra Large (Override default) */
:root:has(#theme-Tab-Numbers[uc-theme-font_size="XLarge"]) {
--font_size: 120% !important; /* Extra Large font size */
} /* Ensure Close X button is on top of everything. */
.tab-close-button {
z-index: 10;
} /* Customize the shape based on the preference values */
:root:has(#theme-Tab-Numbers[uc-theme-background_shape="Square"]) {
--background_shape: 0%; /* Square */
}
:root:has(#theme-Tab-Numbers[uc-theme-background_shape="SlightlyRounded"]) {
--background_shape: 5%; /* Slightly Rounded Square */
}
:root:has(#theme-Tab-Numbers[uc-theme-background_shape="ModeratelyRounded"]) {
--background_shape: 15%; /* Moderately Rounded Square */
}
:root:has(#theme-Tab-Numbers[uc-theme-background_shape="FullyRounded"]) {
--background_shape: 30%; /* Fully Rounded Square */
}
:root:has(#theme-Tab-Numbers[uc-theme-background_shape="Circle"]) {
--background_shape: 50%; /* Perfect Circle */
}

View file

@ -2,7 +2,11 @@
Shows the Number corresponding to each Tab. This can help you navigate between Tabs faster by pressing Cmd + Number of the Tab. (or Ctrl + Number on Windows) Shows the Number corresponding to each Tab. This can help you navigate between Tabs faster by pressing Cmd + Number of the Tab. (or Ctrl + Number on Windows)
Additions (v1.0.5 - current version): Additions (v1.0.6 - current version):
Fixed tab numbering across workspaces.
Additions (v1.0.5):
- Fixed incorrect numbering of pinned tabs, removed glance tabs from the tab count. - Fixed incorrect numbering of pinned tabs, removed glance tabs from the tab count.

View file

@ -1,17 +1,15 @@
{ {
"id": "22c9ec3b-7c62-46ae-991f-c8fff5046829", "id": "22c9ec3b-7c62-46ae-991f-c8fff5046829",
"name": "Tab Numbers", "name": "Tab Numbers",
"description": "Shows the Number corresponding to each Tab.", "description": "Shows the Number corresponding to each Tab.",
"homepage": "https://github.com/philmard/tab-numbers", "homepage": "https://github.com/philmard/tab-numbers",
"style": "https://raw.githubusercontent.com/zen-browser/theme-store/main/themes/22c9ec3b-7c62-46ae-991f-c8fff5046829/chrome.css", "style": "https://raw.githubusercontent.com/zen-browser/theme-store/main/themes/22c9ec3b-7c62-46ae-991f-c8fff5046829/chrome.css",
"readme": "https://raw.githubusercontent.com/zen-browser/theme-store/main/themes/22c9ec3b-7c62-46ae-991f-c8fff5046829/readme.md", "readme": "https://raw.githubusercontent.com/zen-browser/theme-store/main/themes/22c9ec3b-7c62-46ae-991f-c8fff5046829/readme.md",
"image": "https://raw.githubusercontent.com/zen-browser/theme-store/main/themes/22c9ec3b-7c62-46ae-991f-c8fff5046829/image.png", "image": "https://raw.githubusercontent.com/zen-browser/theme-store/main/themes/22c9ec3b-7c62-46ae-991f-c8fff5046829/image.png",
"author": "philmard", "author": "philmard",
"version": "1.0.5", "version": "1.0.6",
"preferences": "https://raw.githubusercontent.com/zen-browser/theme-store/main/themes/22c9ec3b-7c62-46ae-991f-c8fff5046829/preferences.json", "preferences": "https://raw.githubusercontent.com/zen-browser/theme-store/main/themes/22c9ec3b-7c62-46ae-991f-c8fff5046829/preferences.json",
"tags": [ "tags": ["tabs"],
"tabs" "createdAt": "2024-11-09",
], "updatedAt": "2025-05-01"
"createdAt": "2024-11-09", }
"updatedAt": "2025-05-01"
}