summaryrefslogtreecommitdiffstats
path: root/devtools/client/debugger/src/components/Editor/Breakpoints.css
blob: 92121e0f466bfcdb022eba14318415b87ca26ec8 (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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
/* 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/>. */

.theme-light {
  --gutter-hover-background-color: #dde1e4;
  --breakpoint-fill: var(--blue-50);
  --breakpoint-stroke: var(--blue-60);
}

.theme-dark {
  --gutter-hover-background-color: #414141;
  --breakpoint-fill: var(--blue-55);
  --breakpoint-stroke: var(--blue-40);
}

.theme-light,
.theme-dark {
  --logpoint-fill: var(--theme-graphs-purple);
  --logpoint-stroke: var(--purple-60);
  --breakpoint-condition-fill: var(--theme-graphs-yellow);
  --breakpoint-condition-stroke: var(--theme-graphs-orange);
  --breakpoint-skipped-opacity: 0.15;
  --breakpoint-inactive-opacity: 0.3;
  --breakpoint-disabled-opacity: 0.6;
}

/* Standard gutter breakpoints */
.editor-wrapper .breakpoints {
  position: absolute;
  top: 0;
  left: 0;
}

.new-breakpoint .CodeMirror-linenumber {
  pointer-events: none;
}

.editor-wrapper :not(.empty-line, .new-breakpoint .cm6-gutter-breakpoint)
  > .CodeMirror-gutter-wrapper
  > .CodeMirror-linenumber:hover::after {
  content: "";
  position: absolute;
  /* paint below the number */
  z-index: -1;
  top: 0;
  left: 0;
  right: -4px;
  bottom: 0;
  height: 15px;
  background-color: var(--gutter-hover-background-color);
  mask: url(chrome://devtools/content/debugger/images/breakpoint.svg)
    no-repeat;
  mask-size: auto 15px;
  mask-position: right;
}

/* Codemirror 6*/
.cm6-gutter-breakpoint .breakpoint-marker svg {
  fill: var(--breakpoint-fill);
  stroke: var(--breakpoint-stroke);
  height: 14px;
  position: absolute;
  right: -8px;
  z-index: -99;
}

/* set the linenumber white when there is a breakpoint */
.editor-wrapper:not(.skip-pausing) .new-breakpoint .CodeMirror-gutter-wrapper .CodeMirror-linenumber,
 .editor-wrapper:not(.skip-pausing) .cm6-gutter-breakpoint {
  color: white;
}

/* move the breakpoint below the other gutter elements */
.new-breakpoint .CodeMirror-gutter-elt:nth-child(2) {
  z-index: 0;
}

.editor.new-breakpoint svg {
  fill: var(--breakpoint-fill);
  stroke: var(--breakpoint-stroke);
  width: 60px;
  height: 15px;
  position: absolute;
  top: 0px;
  right: -4px;
}

.editor .breakpoint {
  position: absolute;
  right: -2px;
}

.editor.new-breakpoint.folding-enabled svg {
  right: -16px;
}

.new-breakpoint.has-condition .CodeMirror-gutter-wrapper svg {
  fill: var(--breakpoint-condition-fill);
  stroke: var(--breakpoint-condition-stroke);
}

.new-breakpoint.has-log .CodeMirror-gutter-wrapper svg {
  fill: var(--logpoint-fill);
  stroke: var(--logpoint-stroke);
}

.editor.new-breakpoint.breakpoint-disabled svg,
.blackboxed-line .editor.new-breakpoint svg,
.cm6-gutter-breakpoint .breakpoint-marker.breakpoint-disabled svg,
.cm6-gutter-breakpoint.blackboxed-line .breakpoint-marker svg {
  fill-opacity: var(--breakpoint-disabled-opacity);
  stroke-opacity: var(--breakpoint-disabled-opacity);
}

.editor-wrapper.skip-pausing .editor.new-breakpoint svg {
  fill-opacity: var(--breakpoint-skipped-opacity);
}

/* Columnn breakpoints */
.column-breakpoint {
  display: inline;
  padding-inline-start: 1px;
  padding-inline-end: 1px;
}

.column-breakpoint:hover {
  background-color: transparent;
}

.column-breakpoint svg {
  display: inline-block;
  cursor: pointer;
  height: 13px;
  width: 11px;
  vertical-align: top;
  fill: var(--breakpoint-fill);
  stroke: var(--breakpoint-stroke);
  fill-opacity: var(--breakpoint-inactive-opacity);
  stroke-opacity: var(--breakpoint-inactive-opacity);
}

.column-breakpoint.active svg {
  fill: var(--breakpoint-fill);
  stroke: var(--breakpoint-stroke);
  fill-opacity: 1;
  stroke-opacity: 1;
}

.column-breakpoint.disabled svg {
  fill-opacity: var(--breakpoint-disabled-opacity);
  stroke-opacity: var(--breakpoint-disabled-opacity);
}

.column-breakpoint.has-log.disabled svg {
  fill-opacity: 0.5;
  stroke-opacity: 0.5;
}

.column-breakpoint.has-condition svg {
  fill: var(--breakpoint-condition-fill);
  stroke: var(--breakpoint-condition-stroke);
}

.column-breakpoint.has-log svg {
  fill: var(--logpoint-fill);
  stroke: var(--logpoint-stroke);
}

.editor-wrapper.skip-pausing .column-breakpoint svg {
  fill-opacity: var(--breakpoint-skipped-opacity);
}

.img.column-marker {
  background-image: url(chrome://devtools/content/debugger/images/column-marker.svg);
}