From b38ec91016b7747c6b4af4f3c0d0a660606c3b66 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Tue, 29 Sep 2020 10:55:56 +0300 Subject: [PATCH] create theme_aware_modal_prompts.css --- chrome/theme_aware_modal_prompts.css | 42 ++++++++++++++++++++++++++++ html_resources/tagmap.json | 3 +- tags.csv | 1 + 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 chrome/theme_aware_modal_prompts.css diff --git a/chrome/theme_aware_modal_prompts.css b/chrome/theme_aware_modal_prompts.css new file mode 100644 index 0000000..4a61e16 --- /dev/null +++ b/chrome/theme_aware_modal_prompts.css @@ -0,0 +1,42 @@ +/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/theme_aware_modal_prompts.css made available under Mozilla Public License v. 2.0 +See the above repository for updates as well as full license text. */ + +/* Makes the popup of alert() prompt() etc. respept theme colors as well as be slightly differently styled */ + +tabmodalprompt >.spacer-top{ display: none } +.tabmodalprompt-mainContainer{ + -moz-box-orient: horizontal; + box-shadow: 0 0px 14px black; + background-image: linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)); + border-top: none !important; +} +:root:-moz-lwtheme-brighttext .tabmodalprompt-mainContainer{ background-color: black !important; } +.tabmodalprompt-topContainer{ color: var(--toolbar-color); padding-inline-end: 0px !important; } +.tabmodalprompt-buttonContainer{ background: transparent !important; padding-top: 7em !important; } + +.tabmodalprompt-rows input{ color: inherit; -moz-appearance: none; background: rgba(255,255,255,0.1); border: 1px solid currentColor; } + +.tabmodalprompt-infoContainer{ + display: flex; + flex-direction: column; + + min-width: 30ch; +} +.infoTitle{ font-size: 1.1em } +.infoBody{ margin-inline-start: 6px !important; } + + +.tabmodalprompt-buttonContainer > button{ + -moz-appearance: none !important; + border: 1px solid rgba(0,0,0,0.1); + border-radius: 4px; + color: var(--toolbar-color) !important; +} +.tabmodalprompt-buttonContainer > button:hover{ + box-shadow: inset 0 0 6px grey +} + +.tabmodalprompt-buttonContainer > button[default], +.tabmodalprompt-buttonContainer > button:focus{ background-color: #3388ff; color: white !important; } + +.tabmodalprompt-buttonContainer > button:active{ background-image: linear-gradient(rgba(0,0,0,0.1),rgba(0,0,0,0.1)) } \ No newline at end of file diff --git a/html_resources/tagmap.json b/html_resources/tagmap.json index f3130e1..2072351 100644 --- a/html_resources/tagmap.json +++ b/html_resources/tagmap.json @@ -107,5 +107,6 @@ "vertical_popup_menubar.css":["menubar","menu","toolbars","popup"], "window_control_placeholder_support.css":["window-control","patch"], "round_ui_items.css":["buttons","icon","menu","tabs","toolbars","bookmarks"], -"curved_tabs.css":["tabs","tab"] +"curved_tabs.css":["tabs","tab"], +"theme_aware_modal_prompts.css":["effect","dark-mode","colors","popup"] } diff --git a/tags.csv b/tags.csv index f65766d..ec8bd69 100644 --- a/tags.csv +++ b/tags.csv @@ -107,3 +107,4 @@ vertical_popup_menubar.css,menubar,menu,toolbars,popup window_control_placeholder_support.css,window-control,patch round_ui_items.css,buttons,icon,menu,tabs,toolbars,bookmarks curved_tabs.css,tabs,tab +theme_aware_modal_prompts.css,effect,dark-mode,colors,popup