From 5fe1a8418f24d89985e7574a4d207878d2121b06 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 8 Jul 2024 00:11:41 +0900 Subject: [PATCH] Add: Content - `about:support` refresh button as danger color #941 --- css/leptonContent.css | 40 +++++++++++++++++++ css/leptonContentESR.css | 19 +++++++++ src/contents/_proton_contents.scss | 3 ++ .../proton_contents/_about_others.scss | 19 +++++++++ 4 files changed, 81 insertions(+) create mode 100644 src/contents/proton_contents/_about_others.scss diff --git a/css/leptonContent.css b/css/leptonContent.css index 3529297b..f6465054 100644 --- a/css/leptonContent.css +++ b/css/leptonContent.css @@ -2266,6 +2266,25 @@ background-image: url("../icons/performance.svg") !important; } } + /*= about:processes ==========================================================*/ + @-moz-document url-prefix("about:support") { + #reset-box-button { + --in-content-focus-outline-color: var(--in-content-danger-button-background) !important; + background-color: var(--in-content-danger-button-background) !important; + color: var(--in-content-primary-button-text-color) !important; + border-color: var(--in-content-primary-button-border-color) !important; + } + #reset-box-button:enabled:hover { + background-color: var(--in-content-danger-button-background-hover) !important; + color: var(--in-content-primary-button-text-color-hover) !important; + border-color: var(--in-content-primary-button-border-hover) !important; + } + #reset-box-button:enabled:hover:active { + background-color: var(--in-content-danger-button-background-active) !important; + color: var(--in-content-primary-button-text-color-active) !important; + border-color: var(--in-content-primary-button-border-active) !important; + } + } /*= chrome://browser/content/places/places.xhtml =============================*/ @-moz-document url("chrome://browser/content/places/places.xhtml") { @@ -5786,6 +5805,7 @@ /*= about:memory =============================================================*/ /*= about:preferences ========================================================*/ /*= about:processes ==========================================================*/ + /*= about:processes ==========================================================*/ /*= chrome://browser/content/places/places.xhtml =============================*/ } @media (-moz-bool-pref: "userContent.page.proton") and (-moz-bool-pref: "userContent.page.field_border") and (prefers-reduced-motion: no-preference) { @@ -5967,6 +5987,26 @@ } } } +@media (-moz-bool-pref: "userContent.page.proton") { + @-moz-document url-prefix("about:support") { + #reset-box-button { + --in-content-focus-outline-color: var(--in-content-danger-button-background) !important; + background-color: var(--in-content-danger-button-background) !important; + color: var(--in-content-primary-button-text-color) !important; + border-color: var(--in-content-primary-button-border-color) !important; + } + #reset-box-button:enabled:hover { + background-color: var(--in-content-danger-button-background-hover) !important; + color: var(--in-content-primary-button-text-color-hover) !important; + border-color: var(--in-content-primary-button-border-hover) !important; + } + #reset-box-button:enabled:hover:active { + background-color: var(--in-content-danger-button-background-active) !important; + color: var(--in-content-primary-button-text-color-active) !important; + border-color: var(--in-content-primary-button-border-active) !important; + } + } +} @media (-moz-bool-pref: "userContent.page.proton") { @-moz-document url("chrome://browser/content/places/places.xhtml") { diff --git a/css/leptonContentESR.css b/css/leptonContentESR.css index a4b16d6c..52ce9250 100644 --- a/css/leptonContentESR.css +++ b/css/leptonContentESR.css @@ -2269,6 +2269,25 @@ background-image: url("../icons/performance.svg") !important; } } + /*= about:processes ==========================================================*/ + @-moz-document url-prefix("about:support") { + #reset-box-button { + --in-content-focus-outline-color: var(--in-content-danger-button-background) !important; + background-color: var(--in-content-danger-button-background) !important; + color: var(--in-content-primary-button-text-color) !important; + border-color: var(--in-content-primary-button-border-color) !important; + } + #reset-box-button:enabled:hover { + background-color: var(--in-content-danger-button-background-hover) !important; + color: var(--in-content-primary-button-text-color-hover) !important; + border-color: var(--in-content-primary-button-border-hover) !important; + } + #reset-box-button:enabled:hover:active { + background-color: var(--in-content-danger-button-background-active) !important; + color: var(--in-content-primary-button-text-color-active) !important; + border-color: var(--in-content-primary-button-border-active) !important; + } + } /*= chrome://browser/content/places/places.xhtml =============================*/ @-moz-document url("chrome://browser/content/places/places.xhtml") { diff --git a/src/contents/_proton_contents.scss b/src/contents/_proton_contents.scss index 2a06c7a6..ca094ddc 100644 --- a/src/contents/_proton_contents.scss +++ b/src/contents/_proton_contents.scss @@ -32,5 +32,8 @@ /*= about:processes ==========================================================*/ @import "proton_contents/about_processes"; +/*= about:processes ==========================================================*/ +@import "proton_contents/about_others"; + /*= chrome://browser/content/places/places.xhtml =============================*/ @import "../library/contents"; diff --git a/src/contents/proton_contents/_about_others.scss b/src/contents/proton_contents/_about_others.scss new file mode 100644 index 00000000..e55a4768 --- /dev/null +++ b/src/contents/proton_contents/_about_others.scss @@ -0,0 +1,19 @@ +@include moz-document(url-prefix "about:support") { + #reset-box-button { + --in-content-focus-outline-color: var(--in-content-danger-button-background) !important; + background-color: var(--in-content-danger-button-background) !important; + color: var(--in-content-primary-button-text-color) !important; + border-color: var(--in-content-primary-button-border-color) !important; + + &:enabled:hover { + background-color: var(--in-content-danger-button-background-hover) !important; + color: var(--in-content-primary-button-text-color-hover) !important; + border-color: var(--in-content-primary-button-border-hover) !important; + } + &:enabled:hover:active { + background-color: var(--in-content-danger-button-background-active) !important; + color: var(--in-content-primary-button-text-color-active) !important; + border-color: var(--in-content-primary-button-border-active) !important; + } + } +}