summaryrefslogtreecommitdiffstats
path: root/devtools/client/aboutdebugging/src/components/shared/Message.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/aboutdebugging/src/components/shared/Message.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/aboutdebugging/src/components/shared/Message.css')
-rw-r--r--devtools/client/aboutdebugging/src/components/shared/Message.css79
1 files changed, 79 insertions, 0 deletions
diff --git a/devtools/client/aboutdebugging/src/components/shared/Message.css b/devtools/client/aboutdebugging/src/components/shared/Message.css
new file mode 100644
index 0000000000..e2c71c50b4
--- /dev/null
+++ b/devtools/client/aboutdebugging/src/components/shared/Message.css
@@ -0,0 +1,79 @@
+/* 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/. */
+
+.message--level-error {
+ --message-background-color: var(--error-background);
+ --message-border-color: var(--error-border);
+ --message-color: var(--error-text);
+ --message-icon-color: var(--error-icon);
+}
+
+.message--level-info {
+ --message-background-color: var(--grey-20);
+ --message-border-color: transparent;
+ --message-color: var(--grey-90);
+ --message-icon-color: var(--grey-90);
+}
+
+.message--level-warning {
+ --message-background-color: var(--warning-background);
+ --message-border-color: var(--warning-border);
+ --message-color: var(--warning-text);
+ --message-icon-color: var(--warning-icon);
+}
+
+/*
+ * Layout of the message
+ *
+ * +--------+-----------------+----------+
+ * | Icon | Message content | closing |
+ * | | (several lines) | button |
+ * | | ( ... ) |(optional)|
+ * +--------+-----------------+----------+
+ */
+.message {
+ background-color: var(--message-background-color);
+ border: 1px solid var(--message-border-color);
+ border-radius: var(--base-unit);
+ color: var(--message-color);
+ display: grid;
+ grid-column-gap: var(--base-unit);
+ grid-template-columns: calc(var(--base-unit) * 6) 1fr auto;
+ grid-template-areas:
+ "icon body button";
+ margin: calc(var(--base-unit) * 2) 0;
+ padding: var(--base-unit);
+ -moz-context-properties: fill;
+}
+
+.message__icon {
+ margin: var(--base-unit);
+ fill: var(--message-icon-color);
+ grid-area: icon;
+}
+
+.message__body {
+ align-self: center;
+ font-size: var(--message-font-size);
+ font-weight: 400;
+ grid-area: body;
+ line-height: 1.6;
+}
+
+.message__button {
+ grid-area: button;
+ fill: var(--message-icon-color);
+}
+
+.message__button:hover {
+ /* reverse colors with icon when hover state */
+ background-color: var(--message-icon-color);
+ fill: var(--message-background-color);
+}
+
+.message__button:active {
+ /* reverse colors with text when active state */
+ background-color: var(--message-color);
+ fill: var(--message-background-color);
+}