summaryrefslogtreecommitdiffstats
path: root/devtools/client/themes/badge.css
blob: 5f635a225c8cd739c6798caaf8c1667c9d10a449 (plain)
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
105
106
107
108
/* 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/. */

:root {
  --badge-active-background-color: var(--blue-50);
  --badge-active-border-color: #FFFFFFB3;
  --badge-background-color: white;
  --badge-border-color: #CACAD1;
  --badge-color: var(--grey-60);
  --badge-hover-background-color: #DFDFE8;
  --badge-interactive-background-color: var(--grey-20);
  --badge-interactive-color: var(--grey-90);
  --badge-scrollable-color: #8000D7;
  --badge-scrollable-background-color: #FFFFFF;
  --badge-scrollable-active-background-color: #8000D7;
}

.theme-dark:root {
  --badge-active-background-color: var(--blue-60);
  --badge-active-border-color: #FFF6;
  --badge-background-color: var(--grey-80);
  --badge-border-color: var(--grey-50);
  --badge-color: var(--grey-40);
  --badge-hover-background-color: var(--grey-80);
  --badge-interactive-background-color: var(--grey-70);
  --badge-interactive-color: var(--grey-30);
  --badge-scrollable-color: #B98EFF;
  --badge-scrollable-background-color: transparent;
}

/* Inspector badge */
.inspector-badge,
.editor.text .whitespace::before,
.unavailable-children::before {
  display: inline-block;
  /* 9px text is too blurry on low-resolution screens */
  font-size: 10px;
  font-weight: normal;
  line-height: 10px;
  height: 12px;
  margin-top: 1px;
  vertical-align: top;
  border: 1px solid var(--badge-border-color);
  border-radius: 3px;
  padding: 0px 2px;
  margin-inline-start: 5px;
  user-select: none;
  background-color: var(--badge-background-color);
  color: var(--badge-color);
  box-sizing: border-box;
}

.editor.text .whitespace::before {
  content: attr(data-label);
  margin-inline-start: 0;
}

.unavailable-children::before {
  content: attr(data-label);
  height: auto;
}

@media (min-resolution: 1.1dppx) {
  .inspector-badge,
  .editor.text .whitespace::before {
    font-size: 9px;
  }
}

/* Inspector badges that are interactive/clickable */
.inspector-badge.interactive {
  background-color: var(--badge-interactive-background-color);
  color: var(--badge-interactive-color);
  cursor: pointer;
}

.inspector-badge:not(.active).interactive:focus,
.inspector-badge:not(.active).interactive:hover {
  background-color: var(--badge-hover-background-color);
}

.inspector-badge.active,
.inspector-badge.interactive.active {
  background-color: var(--badge-active-background-color);
  border-color: var(--badge-active-border-color);
  color: var(--theme-selection-color);
}

.inspector-badge.interactive.scrollable-badge {
  background-color: var(--badge-scrollable-background-color);
  border-color: var(--badge-scrollable-color);
  color: var(--badge-scrollable-color);
}

.inspector-badge.interactive.scrollable-badge.active {
  background-color: var(--badge-scrollable-active-background-color);
  color: var(--theme-selection-color);
}

.inspector-badge.has-disabled-events {
  font-style: italic;
}

.inspector-badge.has-disabled-events::before {
  content: "*";
  padding-inline-end: 2px;
}