From c4ca945d5d2dcf2a0b9d4b2954739b83159cc2e5 Mon Sep 17 00:00:00 2001 From: bmFtZQ <62812711+bmFtZQ@users.noreply.github.com> Date: Tue, 1 Jun 2021 21:20:04 +0800 Subject: [PATCH] newtab page for proton --- chrome/userContent/Proton-NewTab.css | 198 +++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 chrome/userContent/Proton-NewTab.css diff --git a/chrome/userContent/Proton-NewTab.css b/chrome/userContent/Proton-NewTab.css new file mode 100644 index 0000000..e3142e3 --- /dev/null +++ b/chrome/userContent/Proton-NewTab.css @@ -0,0 +1,198 @@ +/* Proton NewTab Page */ +@-moz-document url("about:newtab"), url("about:home") { + /* Lightmode Colours */ + body:not([lwt-newtab], [lwt-newtab-brighttext]) { + --newtab-background-color: #f5f5f5 !important; + --newtab-search-header-background-color: #f5f5f5f2 !important; + --newtab-seperator-line-color: #ddd !important; + --newtab-textbox-background-color: #fff !important; + --newtab-topsites-background-color: #fff !important; + --newtab-topsites-outer-card-hover: rgba(223,233,233,.3) !important; + --newtab-search-text-color: #262626 !important; + --newtab-text-primary-color: #262626 !important; + --newtab-background-primary-text-color: rgba(0,0,0,.83) !important; + --newtab-wordmark-color: #737373 !important; + --newtab-link-primary-color: #006cbe !important; + + --newtab-card-background-color: #fff !important; + --newtab-text-secondary-color: #767676 !important; + --newtab-card-hairline-color: rgba(0,0,0,.1) !important; + } + + /* Darkmode Colours */ + body[style*="--newtab-background-color:rgba(42, 42, 46, 1); --newtab-text-primary-color:rgba(251, 251, 254, 1);"][lwt-newtab-brighttext], + body:not([style*="color"])[lwt-newtab-brighttext] { + --newtab-background-color: #242424 !important; + --newtab-search-header-background-color: #242424f2 !important; + --newtab-seperator-line-color: #4c4c4c !important; + --newtab-textbox-background-color: #4a4a4a !important; + --newtab-topsites-background-color: #4a4a4a !important; + --newtab-topsites-outer-card-hover: rgba(0,0,0,.3) !important; + --newtab-search-text-color: #f5f5f5 !important; + --newtab-text-primary-color: #fff !important; + --newtab-background-primary-text-color: #fff !important; + --newtab-wordmark-color: #fff !important; + --newtab-link-primary-color: #49a6ec !important; + + --newtab-card-background-color: #2b2b2b !important; + --newtab-text-secondary-color: #929292 !important; + --newtab-card-hairline-color: rgba(0,0,0,.2) !important; + } + + /* Search Textbox */ + .outer-wrapper.newtab-experience .search-wrapper .search-handoff-button, .outer-wrapper.newtab-experience .search-wrapper input { + box-shadow: 0 0 2.9px rgba(0,0,0,.11), 0 1.6px 3.6px rgba(0,0,0,.13) !important; + border-radius: 4px !important; + font-weight: 400 !important; + border: 0 !important; + } + + .fake-textbox { + white-space: nowrap !important; + } + + .outer-wrapper.newtab-experience .search-wrapper .search-inner-wrapper { + min-height: 44px !important; + } + + .outer-wrapper.newtab-experience .search-wrapper .search-handoff-button .fake-caret { + top: 14px !important; + } + + .search-wrapper.search-disabled .search-handoff-button { + opacity: 0 !important; + } + + body:not(.inline-onboarding) .fixed-search .search-wrapper { + background-color: color-mix(in srgb, var(--newtab-background-color) 95%, transparent) !important; + } + + /* Topsite Tiles */ + .outer-wrapper.newtab-experience .top-site-outer .tile { + border-radius: 4px !important; + box-shadow: none !important; + } + + .outer-wrapper.newtab-experience .top-site-outer { + border-radius: 4px !important; + } + + /* Hide pin icon on topsite tiles */ + .top-site-outer .icon-pin-small { display: none !important; } + .top-site-outer .title:not(.pinned) { opacity: .6 !important; } + + /* Topsite Tile Size Adjustments */ + .outer-wrapper.newtab-experience .top-site-outer .tile { height: 44px !important; width: 44px !important; } + .top-site-outer .tile .icon-wrapper, .outer-wrapper.newtab-experience .top-site-outer .default-icon, .outer-wrapper.newtab-experience .top-site-outer .search-topsite { width: 24px !important; height: 24px !important; background-size: 24px !important; } + .top-site-outer .tile .icon-wrapper.letter-fallback::before { font-size: 32px !important; } + + + .top-sites .section-body { + text-align: center !important; + } + + .outer-wrapper.newtab-experience .top-site-outer { + width: 112px !important; + height: 84px !important; + padding: 10px 12px !important; + margin-bottom: 14px !important; + } + + .outer-wrapper.newtab-experience .top-site-outer .context-menu-button { + border-radius: 2px !important; + height: 24px !important; + width: 24px !important; + inset-inline-end: -6px !important; + top: -4px !important; + } + + .outer-wrapper.newtab-experience .top-site-outer .context-menu-button:hover { + background-color: var(--newtab-topsites-context-menu-hover) !important; + } + + .outer-wrapper.newtab-experience .top-site-outer .context-menu-button:is(:active, :focus) { + fill: var(--newtab-icon-primary-color) !important; + } + + .top-site-outer .title:not(.sponsored) .sponsored-label { + display: none !important; + } + + /* Recommended by Pocket Cards */ + .ds-card-grid { + gap: 12px !important; + } + + .ds-card-grid .ds-card { + background-color: var(--newtab-card-background-color) !important; + } + + .outer-wrapper.newtab-experience .ds-card-grid.ds-card-grid-border .ds-card:not(.placeholder) { + border-radius: 6px !important; + box-shadow: 0 0 2.9px rgba(0,0,0,.11), 0 1.6px 3.6px rgba(0,0,0,.13) !important; + } + + .outer-wrapper.newtab-experience .ds-card-grid.ds-card-grid-border .ds-card:not(.placeholder) .img-wrapper .img img { + border-radius: 6px 6px 0 0 !important; + } + + .ds-card .ds-card-link:hover .img-wrapper { + filter: brightness(0.9) !important; + } + + .ds-card .meta .title { + font-size: 20px !important; + line-height: 24px !important; + font-weight: 600 !important; + } + + .ds-card header { + color: var(--newtab-text-primary-color) !important; + } + + .ds-card .ds-card-link:hover header { + text-decoration: underline !important; + } + + .ds-card .meta .source { + font-weight: 400 !important; + line-height: 16px !important; + font-size: 12px !important; + color: var(--newtab-text-secondary-color) !important; + } + + .ds-card .meta .excerpt { + margin-top: 2px !important; + font-size: 14px !important; + line-height: 20px !important; + color: var(--newtab-text-primary-color) !important; + opacity: .8 !important; + } + + /* Recent Activity Cards */ + .ds-highlights .section .section-list { + gap: 12px !important; + } + + .outer-wrapper.newtab-experience .card-outer { + border-radius: 6px !important; + } + + .outer-wrapper.newtab-experience .card-outer .card { + box-shadow: 0 0 2.9px rgba(0,0,0,.11), 0 1.6px 3.6px rgba(0,0,0,.13) !important; + border-radius: 6px !important; + } + + .outer-wrapper.newtab-experience .card-outer .card-preview-image-outer { + border-radius: 6px 6px 0 0 !important; + } + + .card-outer:is(:hover, :focus, .active):not(.placeholder) .card-title { + color: var(--newtab-text-primary-color) !important; + text-decoration: underline !important; + } + + .card-outer:is(:hover, :focus, .active):not(.placeholder) .card-preview-image-outer .card-preview-image { + filter: brightness(0.9) !important; + } +}