From d03d66fddf7129f563333fe750b47bf3992a3e08 Mon Sep 17 00:00:00 2001 From: Marc Date: Sat, 22 Aug 2020 10:02:34 +0200 Subject: [PATCH] firefox theming --- .config/firefox/treestyletab.css | 67 +++++++++++++++++++++ .config/firefox/user.js | 2 + .config/firefox/userChrome.css | 100 +++++++++++++++++++++++++++++-- .config/firefox/userColors.css | 9 +++ .config/firefox/userContent.css | 28 ++++++++- 5 files changed, 201 insertions(+), 5 deletions(-) create mode 100644 .config/firefox/treestyletab.css create mode 100644 .config/firefox/userColors.css diff --git a/.config/firefox/treestyletab.css b/.config/firefox/treestyletab.css new file mode 100644 index 0000000..941950f --- /dev/null +++ b/.config/firefox/treestyletab.css @@ -0,0 +1,67 @@ +:root { + --color-bg: #21252b; + --color-fg: #a9b2c3; + --color-acc1: #b9ca4a; + --color-acc2: #e6c546; + --color-acc3: #61afef + --color-warn1: #e06c75; + --color-white: #eaeaea; +} + +:root, +#background { + background: var(--color-bg); +} + +.tab { + border-top: 0px solid transparent; + border-bottom: 0px solid transparent; + height: 35px; + padding: 0px 0px 0px 0px; + z-index: 0; +} + +/*doesnt work*/ +.tab-item { + border: solid 5px transparent; +} + +.tab.active .label { + color: var(--color-bg); +} +.tab.active { + border-top: 0px solid var(--color-warn1); + background: var(--color-acc1); +} + +.tab .label { + color: var(--color-fg); +} +.tab:not(.active) { + background: var(--color-bg1); + throbber-color: var(--color-acc3); +} + + +/*remove + symbol */ +#tabbar .after-tabs { + display: none !important; +} + +.tab:not(:hover) .closebox { + display: none; +} +/* Show title of unread tabs with red and italic font */ +/* +.tab.unread .label { + color: red !important; + font-style: italic !important; +} +*/ + +/* Add private browsing indicator per tab */ +/* +.tab.private-browsing .label:before { + content: "🕶"; +} +*/ diff --git a/.config/firefox/user.js b/.config/firefox/user.js index e3fa8d1..1e6e866 100644 --- a/.config/firefox/user.js +++ b/.config/firefox/user.js @@ -1,6 +1,8 @@ // to enable userChrome settings user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); +// make sure right click mouse up doesnt instantly closes context menu +user_pref("ui.context_menus.after_mouseup", false) // disable Mozilla telemetry user_pref("toolkit.telemetry.enabled", false); user_pref("toolkit.telemetry.unified", false); diff --git a/.config/firefox/userChrome.css b/.config/firefox/userChrome.css index 07e4961..d2e74fb 100644 --- a/.config/firefox/userChrome.css +++ b/.config/firefox/userChrome.css @@ -1,10 +1,102 @@ +/* enable in about:config +toolkit.legacyUserProfileCustomizations.stylesheets +*/ +@import "userColors.css"; +/*@namespace html url(http://www.w3.org/1999/xhtml); +@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); +*/ + +/* it might be necessary to change theme to dark */ + +/*doesnt work*/ +*|*:root { + --Context-menu-highlight: red; + --Context-menu-background: blue: + --Context-menu-text-color: yellow; +} /* hides the native tabs */ #TabsToolbar { visibility: collapse; } -/* hides save to pocket entry on right click - * doesn"t seem to work though */ -menuitem[label="Save to Pocket"] { - display:none !important; +#urlbar { + background: var(--color-bg) !important; + color: var(--color-fg) !important; + caret-color: red !important; +} + +/* changes in main menu bar (File etc)*/ +#toolbar-menubar { + background: var(--color-bg) !important; + color: var(--color-fg) !important; +} + +/* changes in top bar */ +#navigator-toolbox { + --toolbar-bgcolor: var(--color-bg); +} +.toolbarbutton-1 { + fill: var(--color-fg) !important; + --toolbarbutton-hover-background: var(--color-acc1) !important; + --toolbarbutton-active-background: var(--color-acc3) !important; +} +.toolbarbutton-1:hover{ /*cant change fill in toolbarbutton-1*/ + fill: var(--color-bg) !important; +} +.toolbarbutton-1:active { + fill: var(--color-bg) !important; +} + +/* changes in menus */ + +.popup-internal-box { + background: var(--color-bg) !important; + color: var(--color-fg) !important; + margin: -.2em -.1em -.1em -.1em; /*removes borders*/ +} +/* dont know if necessarz if popup-internal-box color is set */ +.menu-text, +.menu-iconic-text, +.menu-iconic-left, +.menu-right { + color: var(--color-fg) !important; +} + +/*colors of hotkeys in nmenubar*/LL +.menu-accel, +.menu-iconic-accel { + color: var(--color-acc2) !important; +} + +/* context menu */ +/* This changes the color on hover of the context-menu items */ +menubar > menu[_moz-menuactive="true"], +menupopup > menu[_moz-menuactive="true"], +popup > menu[_moz-menuactive="true"], +menuitem[_moz-menuactive="true"] +{background-color: var(--color-acc1) !important} + +/* window "more tools"*/ +#widget-overflow-mainView { + background: var(--color-bg) !important; + color: var(--color-fg) !important; +} + +/* hides sidebar header for tst */ +#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header { + display:none; +} + +#sidebar, +#sidebar-header, +#sidebar-search-container, +#bookmarks-view-children, +#historyTree { + color: var(--color-fg) !important; + background: var(--color-bg) !important; +} + +#sidebar-splitter { + border: none !important; + background-color: var(--color-bg) !important; } diff --git a/.config/firefox/userColors.css b/.config/firefox/userColors.css new file mode 100644 index 0000000..29eec7d --- /dev/null +++ b/.config/firefox/userColors.css @@ -0,0 +1,9 @@ +:root { + --color-bg: #21252b; + --color-fg: #a9b2c3; + --color-acc1: #b9ca4a; + --color-acc2: #e6c546; + --color-acc3: #61afef; + --color-warn1: #e06c75; + --color-white: #eaeaea; +} diff --git a/.config/firefox/userContent.css b/.config/firefox/userContent.css index bc1129d..2613652 100644 --- a/.config/firefox/userContent.css +++ b/.config/firefox/userContent.css @@ -1,6 +1,32 @@ +/* enable in about:config +toolkit.legacyUserProfileCustomizations.stylesheets +*/ + /* colors based on plastic color scheme */ +@import "userColors.css"; :root { - scrollbar-color: rgb(158, 196, 0) rgb(33, 37, 43); + scrollbar-color: var(--color-acc1) var(--color-bg); + + --lwt-toolbar-field-background-color: red !important; /*normally*/ + --lwt-toolbar-field-focus: red !important; /*focussed*/ +} + +/*@-moz-document url(about:newtab), url(about:blank) url(about:home) { + html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay { + background: var(--color-bg) !important; + } } +*/ +@-moz-document url-prefix(about:blank) { + html > body:empty { + background-color: var(--color-bg) !important; + } +} + +@moz-document url(about:blank) { + html > body:empty { + background-color: var(--color-bg) !important; + } +}