summaryrefslogtreecommitdiffstats
path: root/devtools/client/application/src/components/ui/UIButton.css
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
commit0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch)
treea31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /devtools/client/application/src/components/ui/UIButton.css
parentInitial commit. (diff)
downloadfirefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz
firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/application/src/components/ui/UIButton.css')
-rw-r--r--devtools/client/application/src/components/ui/UIButton.css75
1 files changed, 75 insertions, 0 deletions
diff --git a/devtools/client/application/src/components/ui/UIButton.css b/devtools/client/application/src/components/ui/UIButton.css
new file mode 100644
index 0000000000..2d614e09b0
--- /dev/null
+++ b/devtools/client/application/src/components/ui/UIButton.css
@@ -0,0 +1,75 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/* these styles com from Photon. Keep in mind that the "default" style is not used
+ in panels, and we should use the "micro" instead for default, stand-alone buttons. */
+
+:root.theme-light {
+ --button-text-color: var(--grey-90);
+ --button-text-hover-color: var(--grey-90);
+ --button-text-pressed-color: var(--grey-90);
+ --button-background-color: var(--grey-90-a10);
+ --button-background-hover-color: var(--grey-90-a20);
+ --button-background-pressed-color: var(--grey-90-a30);
+}
+
+:root.theme-dark {
+ --button-text-color: var(--grey-40);
+ --button-text-hover-color: var(--grey-30);
+ --button-text-pressed-color: var(--grey-30);
+ --button-background-color: var(--grey-10-a20);
+ --button-background-hover-color: var(--grey-10-a25);
+ --button-background-pressed-color: var(--grey-10-a30);
+}
+
+.ui-button {
+ appearance: none;
+ transition: background-color 0.05s ease-in-out;
+
+ margin: 0;
+ height: calc(var(--base-unit) * 6);
+ padding-inline-start: calc(2 * var(--base-unit));
+ padding-inline-end: calc(2 * var(--base-unit));
+ border: none;
+ border-radius: calc(var(--base-unit) / 2);
+
+ color: var(--button-text-color);
+ background: var(--button-background-color);
+ font-size: var(--caption-10-font-size);
+}
+
+.ui-button:-moz-focusring {
+ outline: none;
+}
+.ui-button::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+
+.ui-button:enabled:hover {
+ background: var(--button-background-hover-color);
+ color: var(--button-text-hover-color);
+}
+
+.ui-button:enabled:active {
+ background: var(--button-background-pressed-color);
+ color: var(--button-text-pressed-color);
+}
+
+.ui-button:focus {
+ box-shadow: 0 0 0 1px var(--blue-50) inset,
+ 0 0 0 1px var(--blue-50),
+ 0 0 0 4px var(--blue-50-a30);
+}
+
+.ui-button:disabled {
+ opacity: 0.4;
+}
+
+/* Note: this "micro" variant here is not the same as the "micro" variant
+ in Photon docs (since we are using that one for our default size) */
+.ui-button--micro {
+ height: auto;
+ padding: calc(var(--base-unit) * 0.5) var(--base-unit);
+}