From e4beaafb9e74ac728110940a7fc30f45799f3dd6 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Sat, 8 Aug 2020 12:01:12 +0300 Subject: [PATCH] create bookmarks_toolbar_on_newtabs_only.css --- chrome/bookmarks_toolbar_on_newtabs_only.css | 28 ++++++++++++++++++++ html_resources/tagmap.json | 3 ++- tags.csv | 1 + 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 chrome/bookmarks_toolbar_on_newtabs_only.css diff --git a/chrome/bookmarks_toolbar_on_newtabs_only.css b/chrome/bookmarks_toolbar_on_newtabs_only.css new file mode 100644 index 0000000..c25f6d0 --- /dev/null +++ b/chrome/bookmarks_toolbar_on_newtabs_only.css @@ -0,0 +1,28 @@ +/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/bookmarks_toolbar_on_newtabs_only.css made available under Mozilla Public License v. 2.0 +See the above repository for updates as well as full license text. */ + +/* "Real" show-bookmarks toolbar on new-tabs only - requires extension: https://addons.mozilla.org/addon/ntp_titler/ */ + +/* This is NOT compatible with autohide_bookmarks_toolbar.css because the collapsing methods are different */ + +#PersonalToolbar{ + --uc-bm-height: 20px; /* Might need to adjust if the toolbar has other buttons */ + --uc-bm-padding: 4px; /* Vertical padding to be applied to bookmarks */ +} + +:root[uidensity="compact"] #PersonalToolbar{ --uc-bm-padding: 1px } +:root[uidensity="touch"] #PersonalToolbar{ --uc-bm-padding: 7px } + +#PersonalToolbar:not([customizing]){ + margin-bottom: calc(0px - var(--uc-bm-height) - 2 * var(--uc-bm-padding)); + visibility: hidden; + transition: margin-bottom 135ms ease !important; +} + +/* The prefixes are set by the above linked extension */ +:root[titlepreface="NewTab - "] #PersonalToolbar, +:root[titlepreface="Home - "] #PersonalToolbar, +:root[titlepreface="PrivateBrowsing - "] #PersonalToolbar{ + visibility: visible; + margin-bottom: 0px; +} \ No newline at end of file diff --git a/html_resources/tagmap.json b/html_resources/tagmap.json index e674798..e394a60 100644 --- a/html_resources/tagmap.json +++ b/html_resources/tagmap.json @@ -100,5 +100,6 @@ "vertical_menubar.css":["menubar","hack"], "window_control_placeholder_support.css":["window-control","patch"], "vertical_popup_menubar.css":["menubar","menu","toolbars","popup"], -"classic_firefox_menu_button.css":["classic","menu"] +"classic_firefox_menu_button.css":["classic","menu"], +"bookmarks_toolbar_on_newtabs_only.css":["bookmarks","toolbars","autohide","hiding"] } diff --git a/tags.csv b/tags.csv index 7066104..2e7cf8d 100644 --- a/tags.csv +++ b/tags.csv @@ -100,3 +100,4 @@ vertical_menubar.css,menubar,hack window_control_placeholder_support.css,window-control,patch vertical_popup_menubar.css,menubar,menu,toolbars,popup classic_firefox_menu_button.css,classic,menu +bookmarks_toolbar_on_newtabs_only.css,bookmarks,toolbars,autohide,hiding