Add: Counter - Bookmark menu

This commit is contained in:
alstjr7375 2022-09-19 09:04:57 +09:00
parent 9f6b349346
commit 6edb9421cc
7 changed files with 109 additions and 61 deletions

View file

@ -7316,61 +7316,6 @@
display: none !important;
}
}
/*= Counter for Tab ==========================================================*/
@supports -moz-bool-pref("userChrome.tab.counter") {
#tabbrowser-tabs {
counter-reset: tab-counts;
}
.tabbrowser-tab:not([hidden="true"]) {
counter-increment: tab-counts;
}
.tabbrowser-tab:not([hidden="true"])[pinned="true"] .tab-label-container::before {
content: " " counter(tab-counts);
}
.tabbrowser-tab:not([hidden="true"]):not([pinned="true"]) .tab-label-container::before {
content: counter(tab-counts) ": ";
}
.tabbrowser-tab:not([hidden="true"]) .tab-label-container {
display: grid;
align-content: safe center;
align-items: safe center;
}
@supports -moz-bool-pref("userChrome.centered.tab") {
@supports not -moz-bool-pref("userChrome.centered.tab.label") {
.tabbrowser-tab:not([hidden="true"]) .tab-label-container {
justify-content: start;
justify-items: start;
}
}
}
@supports not -moz-bool-pref("userChrome.centered.tab") {
.tabbrowser-tab:not([hidden="true"]) .tab-label-container {
justify-content: start;
justify-items: start;
}
}
.tabbrowser-tab:not([hidden="true"]) .tab-label-container::before {
display: inline-block;
grid-row: 1;
}
.tabbrowser-tab:not([hidden="true"]) .tab-label-container > .tab-text {
grid-row: 1;
}
.tabbrowser-tab:not([hidden="true"]) .tab-label-container[pinned] {
width: unset !important;
/* Original: 0 */
}
.tabbrowser-tab:not([hidden="true"]) .tab-label-container[pinned] > .tab-text,
.tabbrowser-tab:not([hidden="true"]) .tab-label-container[pinned] > .tab-secondary-label {
width: 0;
}
.tab-label,
.tab-secondary-label {
overflow: hidden;
}
}
/** Url View UI ***************************************************************/
/*= Url View - Move icon to left =============================================*/
@supports -moz-bool-pref("userChrome.urlView.move_icon_to_left") {
@ -7494,6 +7439,83 @@
}
}
}
/** Others UI **************************************************************/
/*= Counter for Tab ==========================================================*/
@supports -moz-bool-pref("userChrome.counter.tab") {
#tabbrowser-tabs {
counter-reset: tab-counts;
}
.tabbrowser-tab:not([hidden="true"]) {
counter-increment: tab-counts;
}
.tabbrowser-tab:not([hidden="true"])[pinned="true"] .tab-label-container::before {
content: " " counter(tab-counts);
}
.tabbrowser-tab:not([hidden="true"]):not([pinned="true"]) .tab-label-container::before {
content: counter(tab-counts) ": ";
}
.tabbrowser-tab:not([hidden="true"]) .tab-label-container {
display: grid;
align-content: safe center;
align-items: safe center;
}
@supports -moz-bool-pref("userChrome.centered.tab") {
@supports not -moz-bool-pref("userChrome.centered.tab.label") {
.tabbrowser-tab:not([hidden="true"]) .tab-label-container {
justify-content: start;
justify-items: start;
}
}
}
@supports not -moz-bool-pref("userChrome.centered.tab") {
.tabbrowser-tab:not([hidden="true"]) .tab-label-container {
justify-content: start;
justify-items: start;
}
}
.tabbrowser-tab:not([hidden="true"]) .tab-label-container::before {
display: inline-block;
grid-row: 1;
}
.tabbrowser-tab:not([hidden="true"]) .tab-label-container > .tab-text {
grid-row: 1;
}
.tabbrowser-tab:not([hidden="true"]) .tab-label-container[pinned] {
width: unset !important;
/* Original: 0 */
}
.tabbrowser-tab:not([hidden="true"]) .tab-label-container[pinned] > .tab-text,
.tabbrowser-tab:not([hidden="true"]) .tab-label-container[pinned] > .tab-secondary-label {
width: 0;
}
.tab-label,
.tab-secondary-label {
overflow: hidden;
}
}
/*= Counter for Bookmark menu ================================================*/
@supports -moz-bool-pref("userChrome.counter.bookmark_menu") {
menupopup[placespopup="true"] > menu.bookmark-item > .menu-right {
counter-reset: bookmark-counts 0;
}
menupopup[placespopup="true"] > menu.bookmark-item::after {
display: -moz-inline-box;
content: "(" counter(bookmark-counts) ")";
}
menupopup[placespopup="true"] > menu.bookmark-item > .menu-iconic-highlightable-text,
menupopup[placespopup="true"] > menu.bookmark-item > .menu-accel-container,
menupopup[placespopup="true"] > menu.bookmark-item > .menu-right {
-moz-box-ordinal-group: 2;
}
menu.bookmark-item > menupopup[placespopup="true"] > .bookmark-item {
counter-increment: bookmark-counts;
}
}
/** Fullscreen - Overlap toolbar **********************************************/
@supports -moz-bool-pref("userChrome.fullscreen.overlap") {
@supports -moz-bool-pref("browser.fullscreen.autohide") {

View file

@ -0,0 +1,17 @@
menupopup[placespopup="true"] > menu.bookmark-item > .menu-right {
counter-reset: bookmark-counts 0;
}
menupopup[placespopup="true"] > menu.bookmark-item::after {
display: -moz-inline-box;
content: "(" counter(bookmark-counts) ")";
}
menupopup[placespopup="true"] > menu.bookmark-item > .menu-iconic-highlightable-text,
menupopup[placespopup="true"] > menu.bookmark-item > .menu-accel-container,
menupopup[placespopup="true"] > menu.bookmark-item > .menu-right {
-moz-box-ordinal-group: 2;
}
menu.bookmark-item > menupopup[placespopup="true"] > .bookmark-item {
counter-increment: bookmark-counts;
}

9
src/counter/_index.scss Normal file
View file

@ -0,0 +1,9 @@
/*= Counter for Tab ==========================================================*/
@include Option("userChrome.counter.tab") {
@import "tab";
}
/*= Counter for Bookmark menu ================================================*/
@include Option("userChrome.counter.bookmark_menu") {
@import "bookmark_menu";
}

View file

@ -48,6 +48,9 @@
/** Sidebar UI ****************************************************************/
@import "sidebar/index";
/** Others UI **************************************************************/
@import "counter/index";
/** Fullscreen - Overlap toolbar **********************************************/
@import "fullscreen/index";

View file

@ -39,8 +39,3 @@
@include Option("userChrome.tab.crashed") {
@import "crashed_tab";
}
/*= Counter for Tab ==========================================================*/
@include Option("userChrome.tab.counter") {
@import "counter";
}

View file

@ -107,6 +107,9 @@ user_pref("userChrome.rounding.square_tab", false);
// user_pref("userChrome.centered.urlbar", true);
// user_pref("userChrome.centered.bookmarkbar", true);
// user_pref("userChrome.counter.tab", true);
// user_pref("userChrome.counter.bookmark_menu", true);
// user_pref("userChrome.rounding.square_button", true);
// user_pref("userChrome.rounding.square_panel", true);
// user_pref("userChrome.rounding.square_panelitem", true);
@ -146,7 +149,6 @@ user_pref("userChrome.rounding.square_tab", false);
// user_pref("userChrome.tab.close_button_at_pinned.background", true);
// user_pref("userChrome.tab.close_button_at_hover.always", true); // Need close_button_at_hover
// user_pref("userChrome.tab.sound_show_label", true); // Need remove sound_hide_label
// user_pref("userChrome.tab.counter", true);
// user_pref("userChrome.panel.remove_strip", true);
// user_pref("userChrome.panel.full_width_separator", true);