summaryrefslogtreecommitdiffstats
path: root/devtools/client/shared/toolbarbutton.css
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /devtools/client/shared/toolbarbutton.css
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/shared/toolbarbutton.css')
-rw-r--r--devtools/client/shared/toolbarbutton.css86
1 files changed, 86 insertions, 0 deletions
diff --git a/devtools/client/shared/toolbarbutton.css b/devtools/client/shared/toolbarbutton.css
new file mode 100644
index 0000000000..294900c7b7
--- /dev/null
+++ b/devtools/client/shared/toolbarbutton.css
@@ -0,0 +1,86 @@
+/* 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/. */
+
+/**
+ * Legacy `devtools-toolbarbutton` styles, extracted from common.css because
+ * we're only using them in Style Editor,
+ * and it makes maintaining the newer `devtools-button` styles easier.
+ */
+
+.devtools-toolbarbutton {
+ appearance: none;
+ background: transparent;
+ border: none;
+ border-radius: 2px;
+ color: var(--theme-body-color);
+ text-shadow: none;
+ padding: 2px;
+ margin: 1px;
+ white-space: nowrap;
+}
+
+.devtools-toolbarbutton:not([label])[checked=true] > .toolbarbutton-icon,
+.devtools-toolbarbutton:not([label])[open=true] > .toolbarbutton-icon {
+ color: var(--theme-icon-checked-color);
+}
+
+.devtools-toolbarbutton .toolbarbutton-icon {
+ width: 16px;
+ height: 16px;
+ -moz-context-properties: fill;
+ fill: currentColor;
+ color: var(--theme-icon-color);
+ direction: ltr;
+ font-size: 11px;
+}
+
+.devtools-toolbarbutton:not([label]) > .toolbarbutton-icon {
+ margin: 0 3px;
+}
+
+.devtools-toolbarbutton:not([label]) > .toolbarbutton-text {
+ display: none;
+}
+
+.devtools-toolbarbutton[disabled] {
+ opacity: 0.5 !important;
+}
+
+.devtools-toolbarbutton[label] {
+ padding-inline: 6px;
+ background: var(--toolbarbutton-background);
+}
+
+.devtools-toolbarbutton:not([label]):is([checked],[open],:hover,:hover:active) {
+ background: var(--toolbarbutton-hover-background);
+}
+
+/* Selectable button which is unchecked. */
+
+.devtools-toolbarbutton[label]:not([checked=true],[disabled]):hover {
+ background-color: var(--toolbarbutton-hover-background);
+}
+
+.devtools-toolbarbutton:not([checked=true],[disabled])[label]:focus {
+ background-color: var(--toolbarbutton-focus-background);
+ color: var(--toolbarbutton-focus-color);
+}
+
+/* Selectable button which is checked. */
+
+.devtools-toolbarbutton:not([disabled])[label][checked=true],
+.devtools-toolbarbutton:not([disabled])[label][open] {
+ background: var(--toolbarbutton-checked-background);
+ color: var(--toolbarbutton-checked-color);
+}
+
+.devtools-toolbarbutton:not([disabled])[label][checked=true] .toolbarbutton-icon,
+.devtools-toolbarbutton:not([disabled])[label][open] .toolbarbutton-icon {
+ color: inherit;
+}
+
+.devtools-toolbarbutton:not([disabled])[label][checked=true]:focus,
+.devtools-toolbarbutton:not([disabled])[label][open]:focus {
+ background-color: var(--toolbarbutton-checked-focus-background);
+}