The best way to control Claude Code, Codex and more from any computer or phone

main
css 280 lines 5.4 KB
Raw
1 /* The preview comment's pull request page (PreviewComment.tsx). */
2
3 .pc {
4 display: flex;
5 flex-direction: column;
6 border: 1px solid var(--alc-hairline);
7 border-radius: 10px;
8 background: var(--alc-bg-code);
9 color: var(--alc-fg-invert);
10 overflow: hidden;
11 box-shadow: var(--alc-shadow-sm);
12 font-size: 13px;
13 }
14 .pc-bar {
15 display: flex;
16 align-items: center;
17 gap: 6px;
18 padding: 9px 12px;
19 border-bottom: 1px solid rgba(var(--alc-code-edge), 0.08);
20 }
21 .pc-dot {
22 width: 9px;
23 height: 9px;
24 border-radius: 50%;
25 }
26 .pc-bar__url {
27 margin-left: 8px;
28 font-family: var(--alc-font-mono);
29 font-size: 11px;
30 color: var(--alc-code-comment);
31 }
32 .pc-body {
33 flex: 1;
34 /* Room for the tallest frame (three pushes, the comment, the merge), so
35 the card never changes height. */
36 min-height: 318px;
37 padding: 16px 18px 18px;
38 }
39 .pc-title {
40 font-size: 16px;
41 font-weight: 600;
42 }
43 .pc-muted {
44 color: var(--alc-code-comment);
45 font-weight: 400;
46 }
47 .pc-state {
48 display: flex;
49 align-items: center;
50 gap: 8px;
51 margin: 8px 0 16px;
52 }
53 .pc code {
54 font-family: var(--alc-font-mono);
55 font-size: 11px;
56 padding: 1px 5px;
57 border-radius: 4px;
58 background: rgba(var(--alc-code-lift), 0.06);
59 }
60 .pc-pill {
61 padding: 2px 10px;
62 border-radius: 999px;
63 font-size: 12px;
64 font-weight: 600;
65 background: var(--prf-open-solid, #38511f);
66 color: #fbf6ea;
67 }
68 .pc-pill--merged {
69 background: var(--prf-merged-solid, #5b3290);
70 }
71
72 .pc-timeline {
73 list-style: none;
74 margin: 0;
75 padding: 0 0 0 14px;
76 border-left: 1px solid rgba(var(--alc-code-edge), 0.14);
77 display: grid;
78 gap: 12px;
79 }
80 .pc-push,
81 .pc-event {
82 position: relative;
83 display: flex;
84 align-items: center;
85 gap: 8px;
86 flex-wrap: wrap;
87 font-size: 13px;
88 }
89 .pc-push__who {
90 flex: none;
91 display: grid;
92 place-items: center;
93 position: absolute;
94 left: -26px;
95 top: -2px;
96 width: 22px;
97 height: 22px;
98 border-radius: 50%;
99 font-size: 9.5px;
100 font-weight: 600;
101 background: #7a3a18;
102 color: #fbf6ea;
103 }
104 .pc-push__who--merged {
105 background: var(--prf-merged-solid, #5b3290);
106 font-size: 12px;
107 }
108 .pc-status {
109 margin-left: auto;
110 font-family: var(--alc-font-mono);
111 font-size: 11px;
112 color: var(--alc-code-comment);
113 }
114 .pc-status--run {
115 color: var(--alc-warn);
116 }
117 .pc-status--ok {
118 color: var(--alc-success);
119 }
120 .pc-spin {
121 display: inline-block;
122 width: 8px;
123 height: 8px;
124 margin-right: 4px;
125 border: 1.5px solid currentColor;
126 border-right-color: transparent;
127 border-radius: 50%;
128 animation: pc-spin 700ms linear infinite;
129 }
130 @keyframes pc-spin {
131 to {
132 transform: rotate(360deg);
133 }
134 }
135
136 /* The one comment, edited in place. */
137 .pc-comment {
138 border: 1.5px solid rgba(var(--alc-code-edge), 0.16);
139 border-radius: 8px;
140 overflow: hidden;
141 transition:
142 border-color 300ms ease,
143 box-shadow 300ms ease,
144 opacity 600ms ease;
145 }
146 .pc-comment.is-edited {
147 border-color: var(--alc-success);
148 box-shadow: 0 0 0 3px color-mix(in srgb, var(--alc-success) 22%, transparent);
149 }
150 .pc-comment.is-deleting {
151 border-color: var(--alc-danger);
152 opacity: 0.55;
153 }
154 .pc-comment__head {
155 display: flex;
156 align-items: center;
157 gap: 7px;
158 flex-wrap: wrap;
159 padding: 8px 12px;
160 font-size: 12.5px;
161 background: rgba(var(--alc-code-lift), 0.03);
162 border-bottom: 1px solid rgba(var(--alc-code-edge), 0.08);
163 }
164 .pc-avatar {
165 display: grid;
166 place-items: center;
167 width: 20px;
168 height: 20px;
169 border-radius: 50%;
170 background: rgba(var(--alc-code-lift), 0.06);
171 }
172 .pc-bot {
173 padding: 0 6px;
174 border: 1px solid rgba(var(--alc-code-edge), 0.24);
175 border-radius: 999px;
176 font-size: 10.5px;
177 color: var(--alc-code-comment);
178 }
179 .pc-edited {
180 margin-left: auto;
181 font-family: var(--alc-font-mono);
182 font-size: 11px;
183 color: var(--alc-success);
184 }
185 .pc-comment__body {
186 padding: 10px 12px;
187 font-family: var(--alc-font-mono);
188 font-size: 12px;
189 line-height: 1.6;
190 overflow-wrap: anywhere;
191 }
192 .pc-link {
193 color: var(--alc-code-type);
194 text-decoration: underline;
195 }
196 .pc-sha {
197 display: inline-block;
198 padding: 0 1px;
199 border-radius: 3px;
200 animation: pc-sha 1100ms ease-out;
201 }
202 @keyframes pc-sha {
203 from {
204 background: color-mix(in srgb, var(--alc-success) 45%, transparent);
205 transform: translateY(-4px);
206 }
207 30% {
208 transform: none;
209 }
210 to {
211 background: transparent;
212 }
213 }
214 .pc-comment__gone {
215 padding: 6px 12px;
216 font-family: var(--alc-font-mono);
217 font-size: 11px;
218 color: var(--alc-danger);
219 border-top: 1px solid rgba(var(--alc-code-edge), 0.08);
220 }
221
222 .pc-enter {
223 animation: pc-enter 360ms ease-out;
224 }
225 @keyframes pc-enter {
226 from {
227 opacity: 0;
228 transform: translateY(6px);
229 }
230 }
231
232 /* Narrow screens: one line per row. Commit messages, the URL scheme and
233 wordier labels drop out; "Preview:" sits on its own line. */
234 .pc-narrow {
235 display: none;
236 }
237 .pc-nowrap {
238 white-space: nowrap;
239 }
240 @media (max-width: 560px) {
241 .pc-wide {
242 display: none;
243 }
244 .pc-narrow {
245 display: inline;
246 }
247 .pc-push,
248 .pc-comment__head {
249 flex-wrap: nowrap;
250 white-space: nowrap;
251 }
252 .pc-label {
253 display: block;
254 }
255 .pc-link {
256 white-space: nowrap;
257 }
258 .pc-title {
259 font-size: 16px;
260 }
261 }
262
263 .alc-motion-paused .pc *,
264 .alc-motion-paused .pc *::before {
265 animation-play-state: paused !important;
266 }
267 @media (max-width: 900px) {
268 /* The tallest phone frame, so the card keeps one height. */
269 .pc-body {
270 min-height: 370px;
271 }
272 }
273
274 @media (prefers-reduced-motion: reduce) {
275 .pc *,
276 .pc *::before {
277 animation: none !important;
278 transition: none !important;
279 }
280 }