refactor(nix): Use userChrome from include/
dir
Also move stuff
This commit is contained in:
parent
c00fe68433
commit
180152426c
4 changed files with 3 additions and 69 deletions
|
@ -1,65 +0,0 @@
|
||||||
/**
|
|
||||||
* Better Floorp vertical tabs
|
|
||||||
*
|
|
||||||
* This makes Floorp's (expanded) vertical tabs not affecting sites' width,
|
|
||||||
* which can cause lag on heavy websites like Twitch and YouTube.
|
|
||||||
*
|
|
||||||
* This also fixed vertical tabs' width breaking when some preference related
|
|
||||||
* to browser's "head" is changed
|
|
||||||
*
|
|
||||||
* Based on my changes for Pulse, but Pulse is dead.
|
|
||||||
* REF: https://github.com/null2264/pulse/commit/fce966a110c2987b08d35bcd04c5992655b24b13
|
|
||||||
*/
|
|
||||||
:root {
|
|
||||||
/* from Floorp source code, too big for me */
|
|
||||||
/*--default-verticaltab-width: 45px;*/
|
|
||||||
/*--hoverd-verticaltab-width: 20em;*/
|
|
||||||
|
|
||||||
--default-verticaltab-width: 35px !important;
|
|
||||||
--hoverd-verticaltab-width: 18em;
|
|
||||||
}
|
|
||||||
|
|
||||||
@charset "UTF-8";
|
|
||||||
@-moz-document url(chrome://browser/content/browser.xhtml) {
|
|
||||||
.browserContainer {
|
|
||||||
border-inline-width: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* >> Fix height being inconsistent on hover */
|
|
||||||
.tab-icon-stack,
|
|
||||||
.tab-label-container {
|
|
||||||
height: 2.7em !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab-icon-stack {
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
/* << Fix height being inconsistent on hover */
|
|
||||||
|
|
||||||
#sidebar-select-box {
|
|
||||||
width: var(--default-verticaltab-width) !important;
|
|
||||||
min-width: var(--default-verticaltab-width) !important;
|
|
||||||
max-width: var(--default-verticaltab-width) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#TabsToolbar {
|
|
||||||
position: relative !important;
|
|
||||||
transition: all 300ms !important;
|
|
||||||
width: calc(var(--default-verticaltab-width) + 5px) !important;
|
|
||||||
min-width: calc(var(--default-verticaltab-width) + 5px) !important;
|
|
||||||
max-width: calc(var(--default-verticaltab-width) + 5px) !important;
|
|
||||||
z-index: 1; /* Probably not needed, since Floorp already handle this */
|
|
||||||
}
|
|
||||||
#TabsToolbar:not(:hover) {
|
|
||||||
scrollbar-width: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#TabsToolbar:hover {
|
|
||||||
transition: all 300ms !important;
|
|
||||||
width: var(--hoverd-verticaltab-width) !important;
|
|
||||||
min-width: var(--hoverd-verticaltab-width) !important;
|
|
||||||
max-width: var(--hoverd-verticaltab-width) !important;
|
|
||||||
z-index: 2; /* Probably not needed, since Floorp already handle this */
|
|
||||||
margin-right: calc((var(--hoverd-verticaltab-width) - var(--default-verticaltab-width) - 5px) * -1) !important;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -16,7 +16,7 @@
|
||||||
/*--hoverd-verticaltab-width: 20em;*/
|
/*--hoverd-verticaltab-width: 20em;*/
|
||||||
|
|
||||||
--default-verticaltab-width: 4.125em !important;
|
--default-verticaltab-width: 4.125em !important;
|
||||||
--hoverd-verticaltab-width: /*ZI:VERTICAL-TAB-HOVER-WIDTH-IN-EM*/ !important;
|
--hoverd-verticaltab-width: /*ZI:*/18em/*:VERTICAL-TAB-HOVER-WIDTH-IN-EM*/ !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
@ -94,4 +94,3 @@
|
||||||
z-index: 2; /* Probably not needed, since Floorp already handle this */
|
z-index: 2; /* Probably not needed, since Floorp already handle this */
|
||||||
margin-right: calc((var(--hoverd-verticaltab-width) - var(--default-verticaltab-width) - 0.125em) * -1) !important;
|
margin-right: calc((var(--hoverd-verticaltab-width) - var(--default-verticaltab-width) - 0.125em) * -1) !important;
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
username = "ziro";
|
username = "ziro";
|
||||||
userChrome = builtins.replaceStrings ["/*ZI:VERTICAL-TAB-HOVER-WIDTH-IN-EM*/"] ["${builtins.toString vars.floorp.verticalTabHoverWidthInEm}em"] (builtins.readFile ../../files/floorp/ziro-userChrome.css);
|
userChrome = builtins.replaceStrings ["/*ZI:*/18em/*:VERTICAL-TAB-HOVER-WIDTH-IN-EM*/"] ["${builtins.toString vars.floorp.verticalTabHoverWidthInEm}em"] (builtins.readFile ../../../include/floorp/ziro-userChrome.css);
|
||||||
settings = {
|
settings = {
|
||||||
"browser.toolbars.bookmarks.visibility" = "newtab";
|
"browser.toolbars.bookmarks.visibility" = "newtab";
|
||||||
"floorp.browser.sidebar.is.displayed" = false;
|
"floorp.browser.sidebar.is.displayed" = false;
|
||||||
|
|
|
@ -70,7 +70,7 @@ for default_path in default_paths:
|
||||||
chrome_path = pathlib.Path(f"{profile_path}/chrome")
|
chrome_path = pathlib.Path(f"{profile_path}/chrome")
|
||||||
chrome_path.mkdir(parents=True, exist_ok=True)
|
chrome_path.mkdir(parents=True, exist_ok=True)
|
||||||
user_chrome_path = chrome_path / "userChrome.css"
|
user_chrome_path = chrome_path / "userChrome.css"
|
||||||
target_path = f"{dotfiles}/.include/ff-chrome/userChrome.css"
|
target_path = f"{dotfiles}/include/floorp/ziro-userChrome.css"
|
||||||
try:
|
try:
|
||||||
user_chrome_path.symlink_to(target_path)
|
user_chrome_path.symlink_to(target_path)
|
||||||
installed += 1
|
installed += 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue