summaryrefslogtreecommitdiffstats
path: root/devtools/client/webconsole/components/Input/EagerEvaluation.css
blob: ac4715989240964e4d6dfac4c3a9ab4888afce19 (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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/* 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/. */

.eager-evaluation-result {
  flex: none;
  font-family: var(--monospace-font-family);
  font-size: var(--theme-code-font-size);
  line-height: var(--console-output-line-height);
  color: var(--theme-text-color-alt);
}

.theme-light .eager-evaluation-result {
  --log-icon-color: var(--grey-35);
  /* Override Reps variables to turn eager eval output gray */
  --object-color: var(--grey-50);
  --number-color: var(--grey-50);
  --string-color: var(--grey-50);
  --node-color: var(--grey-50);
  --reference-color: var(--grey-50);
  --location-color: var(--grey-43);
  --source-link-color: var(--grey-43);
  --null-color: var(--grey-43);
}

.theme-dark .eager-evaluation-result {
  --log-icon-color: var(--grey-55);
  /* Override Reps variables to turn eager eval output gray */
  --object-color: var(--grey-43);
  --number-color: var(--grey-43);
  --string-color: var(--grey-43);
  --node-color: var(--grey-43);
  --reference-color: var(--grey-43);
  --location-color: var(--grey-50);
  --source-link-color: var(--grey-50);
  --null-color: var(--grey-50);
}

.eager-evaluation-result__row {
  direction: ltr;
  display: flex;
  align-items: center;
  overflow-y: hidden;
  height: var(--console-row-height);
  padding: 0 2px;
}

.eager-evaluation-result__icon {
  flex: none;
  width: 14px;
  height: 14px;
  margin: 0 8px;
  background: url(chrome://devtools/skin/images/webconsole/return.svg) no-repeat
    center;
  background-size: 12px;
  -moz-context-properties: fill;
  fill: var(--log-icon-color);
}

.eager-evaluation-result__text {
  flex: 1 1 auto;
  height: 14px;
  overflow: hidden;
  /* Use pre rather than nowrap because we want to preserve consecutive spaces,
   * e.g. if we display "some   string" we should not collapse spaces. */
  white-space: pre;
}

/* Style the reps result */
.eager-evaluation-result__text > * {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eager-evaluation-result__text * {
  /* Some Reps elements define white-space:pre-wrap, which lets the text break
   * to a new line */
  white-space: inherit !important;
}

.eager-evaluation-result__text .objectBox-function .param {
  color: var(--null-color);
}

/* Object property label */
.eager-evaluation-result__text .nodeName {
  color: var(--object-color);
}

/*
 * Inline mode specifics
 */
.webconsole-app:not(.jsterm-editor) .eager-evaluation-result {
  /* It should fill the remaining height in the output+input area */
  flex-grow: 1;
  background-color: var(--console-input-background);
  /* Reserve a bit of whitespace after the content. */
  min-height: calc(
    var(--console-row-height) + var(--console-input-extra-padding)
  );
}

/*
 * Editor mode specifics
 */
.webconsole-app.jsterm-editor .eager-evaluation-result {
  border-top: 1px solid var(--theme-splitter-color);
  border-inline-end: 1px solid var(--theme-splitter-color);
  /* Make text smaller when displayed in the sidebar */
  font-size: 10px;
  line-height: 14px;
  background-color: var(--theme-sidebar-background);
}

.webconsole-app.jsterm-editor .eager-evaluation-result:empty {
  display: none;
}

.webconsole-app.jsterm-editor .eager-evaluation-result__row {
  height: var(--theme-toolbar-height);
}