[tbb-commits] [tor-browser/tor-browser-91.2.0esr-11.0-1] fixup! Bug 21952: Implement Onion-Location

sysrqb at torproject.org sysrqb at torproject.org
Wed Oct 20 00:10:00 UTC 2021


commit 0a86e2a9fdcd36deab9726879cf8403eca29523b
Author: Richard Pospesel <richard at torproject.org>
Date:   Fri Oct 8 16:24:45 2021 +0200

    fixup! Bug 21952: Implement Onion-Location
---
 .../onionservices/content/onionlocation-urlbar.css | 61 +++++++++++++++++-----
 1 file changed, 47 insertions(+), 14 deletions(-)

diff --git a/browser/components/onionservices/content/onionlocation-urlbar.css b/browser/components/onionservices/content/onionlocation-urlbar.css
index 91cad5f178d1..7b7051ace675 100644
--- a/browser/components/onionservices/content/onionlocation-urlbar.css
+++ b/browser/components/onionservices/content/onionlocation-urlbar.css
@@ -1,27 +1,60 @@
 /* Copyright (c) 2020, The Tor Project, Inc. */
 
-#onion-location-button {
-  list-style-image: url(chrome://browser/content/onionservices/onionlocation.svg);
-}
-
 #onion-location-box {
-  border-radius: 3px;
-  background-color: #6200A4;
-  padding-left: 5px;
-  padding-right: 5px;
-  color: white;
+  height: 28px;
+
+  background-color: var(--purple-60);
   -moz-context-properties: fill;
   fill: white;
 }
 
 #onion-location-box:hover {
-  background-color: #0060DF !important;
+  background-color: var(--purple-70);
 }
 
-toolbar[brighttext] #onion-location-box {
-  background-color: #9400ff;
+#onion-location-box:active {
+  background-color: var(--purple-80);
 }
 
-toolbar[brighttext] #onion-location-box:hover {
-  background-color: #0060DF !important;
+ at media (prefers-color-scheme: dark) {
+  #onion-location-box {
+    background-color: var(--purple-50);
+  }
+
+  #onion-location-box:hover {
+    background-color: var(--purple-60);
+  }
+
+  #onion-location-box:active {
+    background-color: var(--purple-70);
+  }
+}
+
+#onion-location-button {
+  list-style-image: url(chrome://browser/content/onionservices/onionlocation.svg);
+  padding-inline-start: 0.5em;
+}
+
+label#onion-label {
+  line-height: 28px;
+  margin: 0;
+  padding-block: 0;
+  padding-inline: 0.5em;
+  color: white;
+  font-weight: bold;
+}
+
+/* set appropriate sizes for the non-standard ui densities */
+:root[uidensity=compact] hbox.urlbar-page-action#onion-location-box {
+  height: 24px;
+}
+:root[uidensity=compact] label#onion-label {
+  line-height: 24px;
+}
+
+:root[uidensity=touch] hbox.urlbar-page-action#onion-location-box {
+  height: 30px;
+}
+:root[uidensity=touch] label#onion-label {
+  line-height: 30px;
 }





More information about the tbb-commits mailing list