File: infobar.css

package info (click to toggle)
firefox 143.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 4,617,328 kB
  • sloc: cpp: 7,478,492; javascript: 6,417,157; ansic: 3,720,058; python: 1,396,372; xml: 627,523; asm: 438,677; java: 186,156; sh: 63,477; makefile: 19,171; objc: 13,059; perl: 12,983; yacc: 4,583; cs: 3,846; pascal: 3,405; lex: 1,720; ruby: 1,003; exp: 762; php: 436; lisp: 258; awk: 247; sql: 66; sed: 53; csh: 10
file content (104 lines) | stat: -rw-r--r-- 2,320 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/* 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/. */

:host(.infobar) {
  --info-bar-background-color: light-dark(var(--color-white), rgb(66, 65, 77));
  --info-bar-text-color: light-dark(var(--color-gray-100), var(--color-gray-05));
  --message-bar-border-color: color-mix(in srgb, currentColor 9%, transparent);

  position: relative;

  &::before {
    content: "";
    display: block;
    width: 2px;
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    height: 100%;
    border-start-start-radius: 4px;
    border-end-start-radius: 4px;
  }

  .container {
    /* Don't let lwthemes set a text-shadow. */
    text-shadow: none;
    padding-block: 3px;
    align-items: center;
  }

  .text-container {
    padding-block: calc(1lh - var(--icon-size) / 2);
  }

  .content {
    gap: 0 12px;
    height: fit-content;
  }

  .close {
    margin-block: 4px;
    margin-inline-start: 8px;
    align-self: flex-start;
  }
}

@media (prefers-contrast) {
  :host(.infobar)::before {
    background-color: CanvasText;
  }
}

@media not (prefers-contrast) {
  :host(.infobar) {
    box-shadow: 0 1px 2px rgba(58, 57, 68, 0.1);
    /* if a custom background color is set, use that, otherwise fall back */
    background-color: var(--info-bar-background-color-configurable, var(--info-bar-background-color));
    color: var(--info-bar-text-color);

    &::before {
      background-image: linear-gradient(0deg, #9059ff 0%, #ff4aa2 52.08%, #ffbd4f 100%);
    }
  }
}

:host([message-bar-type="infobar"]:first-of-type) {
  margin-top: 4px;
}

:host([message-bar-type="infobar"]) {
  margin: 0 4px 4px;
}

::slotted(.notification-button-container) {
  gap: 8px;
  display: inline-flex;
}

::slotted(.text-link) {
  margin: 0 !important;
}

img.inline-icon {
  /* Align inline icon images in the message content */
  vertical-align: middle;
  max-height: 1lh;
  /* Ensure they get the right fill color. */
  -moz-context-properties: fill;
  fill: currentColor;
}

strong {
  font-weight: var(--font-weight-bold);
}

/* type="system" infobar styles */

:host([type="system"]) .icon {
  display: none;
}

:host([type="system"]) .content {
  margin-inline-start: 0;
}