mirror of
https://github.com/black7375/Firefox-UI-Fix.git
synced 2025-12-05 18:20:44 -08:00
Add: Theme - PDF contents darkmode
This commit is contained in:
parent
5415e5d568
commit
5c14948aa4
6 changed files with 49 additions and 1 deletions
5
CREDITS
5
CREDITS
|
|
@ -175,6 +175,11 @@ W: https://github.com/MrOtherGuy/firefox-csshacks
|
|||
C: Copyright (c) 2018 MrOtherGuy
|
||||
L: MPL 2.0
|
||||
|
||||
N: Firefox Custom CSS
|
||||
W: https://github.com/hakan-demirli/Firefox_Custom_CSS
|
||||
C: Copyright (c) 2022 hakan-demirli
|
||||
L: MIT
|
||||
|
||||
N: Fluent UI System Icons
|
||||
W: https://github.com/microsoft/fluentui-system-icons
|
||||
C: Copyright (c) 2020 Microsoft Corporation
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
@include test("simple") {
|
||||
@include assert {
|
||||
@include output {
|
||||
@include moz-document(unobservable-document) {
|
||||
@include example;
|
||||
}
|
||||
@include moz-document(url "about:downloads") {
|
||||
@include example;
|
||||
}
|
||||
|
|
@ -17,6 +20,9 @@
|
|||
}
|
||||
}
|
||||
@include expect {
|
||||
@-moz-document #{unobservable-document()} { // Invalid function name.
|
||||
@include example;
|
||||
}
|
||||
@-moz-document url("about:downloads") {
|
||||
@include example;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1640,6 +1640,23 @@
|
|||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--in-content-primary-button-background-hover) 80%, transparent) !important;
|
||||
}
|
||||
}
|
||||
@supports -moz-bool-pref("userContent.page.dark_mode.pdf") {
|
||||
@-moz-document unobservable-document() {
|
||||
@-moz-document regexp("^(?!.*\\.pdf\\?n).*") {
|
||||
#outerContainer {
|
||||
--sidebaritem-bg-color: #38383d;
|
||||
--uc-pdf-dark-filter: grayscale(10%) invert(90%);
|
||||
}
|
||||
#sidebarContainer > #sidebarContent > #thumbnailView .thumbnailImage {
|
||||
filter: var(--uc-pdf-dark-filter);
|
||||
box-shadow: 0 0 0 1px hsla(0deg, 0%, 100%, 0.5), 0 2px 8px hsla(0deg, 0%, 100%, 0.3) !important;
|
||||
}
|
||||
#viewerContainer > #viewer > .page > .canvasWrapper > canvas {
|
||||
filter: var(--uc-pdf-dark-filter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/** Fully Proton Mode *********************************************************/
|
||||
|
|
|
|||
|
|
@ -2,4 +2,23 @@
|
|||
@import "dark_mode/addons_org";
|
||||
@import "dark_mode/support_org";
|
||||
@import "dark_mode/accounts_com";
|
||||
|
||||
@include Option("userContent.page.dark_mode.pdf") {
|
||||
@include moz-document(unobservable-document) {
|
||||
@include moz-document(regexp "^(?!.*\\.pdf\\?n).*") {
|
||||
#outerContainer {
|
||||
--sidebaritem-bg-color: #38383D;
|
||||
--uc-pdf-dark-filter: grayscale(10%) invert(90%);
|
||||
}
|
||||
|
||||
#sidebarContainer > #sidebarContent > #thumbnailView .thumbnailImage {
|
||||
filter: var(--uc-pdf-dark-filter);
|
||||
box-shadow: 0 0 0 1px hsla(0, 0%, 100%, 0.5), 0 2px 8px hsla(0, 0%, 100%, 0.3) !important;
|
||||
}
|
||||
#viewerContainer > #viewer > .page > .canvasWrapper > canvas {
|
||||
filter: var(--uc-pdf-dark-filter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@mixin moz-document($urlList...) {
|
||||
$result: ();
|
||||
@each $prefix, $urlPattern in $urlList {
|
||||
$result: append($result, #{$prefix}("#{$urlPattern}"), $separator: comma);
|
||||
$result: append($result, #{$prefix}(if($urlPattern, "#{$urlPattern}", null)), $separator: comma);
|
||||
}
|
||||
|
||||
@#{-moz-document} #{$result} {
|
||||
|
|
|
|||
1
user.js
1
user.js
|
|
@ -206,6 +206,7 @@ user_pref("userChrome.rounding.square_tab", false);
|
|||
|
||||
// user_pref("userContent.page.proton_color.dark_blue_accent", true);
|
||||
// user_pref("userContent.page.proton_color.system_accent", true);
|
||||
// user_pref("userContent.page.dark_mode.pdf", true);
|
||||
// user_pref("userContent.page.monospace", true);
|
||||
|
||||
// == Theme Default Settings ===================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue