This repository was archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 409
Expand file tree
/
Copy pathpr-comment.less
More file actions
208 lines (178 loc) · 4.75 KB
/
pr-comment.less
File metadata and controls
208 lines (178 loc) · 4.75 KB
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
@import 'variables';
@avatar-size: 16px;
@avatar-spacing: 6px;
.github-PrCommentThread {
padding: @component-padding @component-padding @component-padding 0;
}
.github-PrComment {
max-width: 60em;
padding: @component-padding;
font-family: @font-family;
font-size: @font-size;
border: 1px solid @base-border-color;
&:first-child {
border-top-left-radius: @component-border-radius;
border-top-right-radius: @component-border-radius;
}
&:last-child {
border-bottom-left-radius: @component-border-radius;
border-bottom-right-radius: @component-border-radius;
}
& + .github-PrComment {
border-top: none;
}
&-header {
color: @text-color-subtle;
line-height: @avatar-size;
}
&-avatar {
margin-right: @avatar-spacing;
height: @avatar-size;
width: @avatar-size;
border-radius: @component-border-radius;
vertical-align: top;
}
&-timeAgo {
color: inherit;
}
&-body {
margin-left: @avatar-size + @avatar-spacing; // avatar + margin
}
&-hidden {
font-size: 14px;
}
&-icon {
vertical-align: middle;
}
// Suggested changes
.js-suggested-changes-blob {
font-size: .9em;
border: 1px solid @base-border-color;
border-radius: @component-border-radius;
.d-flex { display: flex; }
.d-inline-block { display: inline-block; }
.flex-auto { flex: 1 1 auto; }
.p-1 { padding: @component-padding/2; }
.px-1 { padding-left: @component-padding/2; padding-right: @component-padding/2; }
.p-2 { padding: @component-padding; }
.text-gray { color: @text-color-subtle; }
.lh-condensed { line-height: 1.25; }
.rounded-1 { border-radius: @component-border-radius; }
.border { border: 1px solid; }
.border-bottom { border-bottom: 1px solid @base-border-color; }
.border-green { border-color: @text-color-success; }
.octicon { vertical-align: -4px; fill: currentColor; }
.blob-wrapper > table {
width: 100%;
margin: 0;
font-family: var(--editor-font-family);
font-size: var(--editor-font-size);
line-height: var(--editor-line-height);
td {
border: none;
padding: 0 .5em;
}
}
.blob-num {
padding: 0 .5em;
color: @text-color-subtle;
&:before {
content: attr(data-line-number);
}
&-addition {
background-color: fadein(@github-diff-added, 10%);
}
&-deletion {
background-color: fadein(@github-diff-deleted, 10%);
}
}
.blob-code {
&-inner {
&:before { margin-right: .5em; }
.x {
&-first {
border-bottom-left-radius: @component-border-radius;
border-top-left-radius: @component-border-radius;
}
&-last {
border-bottom-right-radius: @component-border-radius;
border-top-right-radius: @component-border-radius;
}
}
}
&-addition {
background-color: @github-diff-added;
&:before { content: "+"; }
.x {
background-color: @github-diff-added-highlight;
}
}
&-deletion {
background-color: @github-diff-deleted;
&:before { content: "-"; }
.x {
background-color: @github-diff-deleted-highlight;
}
}
}
// These styles are mostly copied from the Primer tooltips
.tooltipped {
position: relative;
// This is the tooltip bubble
&::after {
position: absolute;
z-index: 1000000;
display: none;
width: max-content;
max-width: 22em;
padding: .5em .6em;
font-weight: 500;
color: @base-background-color;
text-align: center;
pointer-events: none;
content: attr(aria-label);
background: @background-color-info;
border-radius: @component-border-radius;
}
// This is the tooltip arrow
&::before {
position: absolute;
z-index: 1000001;
display: none;
width: 0;
height: 0;
color: @background-color-info;
pointer-events: none;
content: "";
border: 6px solid transparent;
}
// This will indicate when we'll activate the tooltip
&:hover,
&:active,
&:focus {
&::before,
&::after {
display: inline-block;
text-decoration: none;
}
}
// Tooltipped south
&::after {
top: 100%;
right: 50%;
margin-top: 6px;
}
&::before {
top: auto;
right: 50%;
bottom: -7px;
margin-right: -6px;
border-bottom-color: @background-color-info;
}
// Move the tooltip body to the center of the object.
&::after {
transform: translateX(50%);
}
}
}
}