Repository navigation
Expand file tree
/
Copy pathfile-preview.css
More file actions
27 lines (27 loc) · 6.18 KB
/
Copy pathfile-preview.css
File metadata and controls
27 lines (27 loc) · 6.18 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
.preview-stage.has-file-preview{padding:0;overflow:hidden;height:480px;min-height:320px;max-height:65vh}
.file-preview{height:100%;display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--surface,#fff);color:var(--ink,#293b54)}
.file-preview-tools,.preview-options,.image-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.file-preview-tools{padding:10px 12px;border-bottom:1px solid var(--line);background:var(--surface-soft,#fafbfd);flex:none;font-size:12px}
.file-preview-tools>.btn:last-child{margin-left:auto}.preview-format{font-weight:600;color:var(--muted)}
.preview-options .btn.active{background:var(--surface-selected,#edf3ff);color:var(--blue);border-color:var(--blue)}
.preview-encoding{display:flex;align-items:center;gap:6px;color:var(--muted)}.preview-encoding select{padding:5px 4px;border:1px solid var(--line);border-radius:4px;font-size:12px;background:var(--surface,#fff);color:var(--ink);max-width:140px}
.preview-content{position:relative;flex:1;min-height:0;min-width:0;overflow:hidden;display:flex;flex-direction:column}
.preview-feedback{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:24px;flex:1;min-height:0;text-align:center;overflow:auto}
.preview-feedback strong{font-size:14px;font-weight:500}.preview-feedback p{font-size:12px;color:var(--muted);margin:0;line-height:1.8;max-width:440px}
.preview-status{margin:0;padding:8px 12px;font-size:12px;line-height:1.6;color:var(--muted);border-top:1px solid var(--line);flex:none;background:var(--surface-soft,#fafbfd)}.preview-status:empty{display:none}
.preview-spinner{width:24px;height:24px;border:2px solid var(--line);border-top-color:var(--blue);border-radius:50%;animation:preview-spin 1s linear infinite}
@keyframes preview-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.preview-spinner{animation:none}}
.preview-stage .document-frame{display:block;width:100%;height:100%;min-height:0;flex:1;box-shadow:none;border-radius:0;border:0;background:#e7e9ee}.preview-stage .document-frame[hidden]{display:none}
.preview-panel>.pipeline{margin:0;padding:0 16px;border-top:1px solid var(--line);flex:none}.preview-panel>.pipeline[open]{max-height:220px;overflow:auto}
.image-controls{justify-content:center;padding:8px;border-bottom:1px solid var(--line);flex:none}.image-scale{min-width:46px;text-align:center;font-size:12px;font-variant-numeric:tabular-nums}
.image-viewport{overflow:auto;flex:1;min-height:0;background:var(--surface-soft,#eef1f6);overscroll-behavior:contain}.image-area{display:grid;place-items:center;min-height:100%;min-width:100%;width:max-content;padding:16px;box-sizing:border-box}.image-bounds{position:relative;flex:none}.preview-stage .image-bounds img{max-width:none;position:absolute;left:50%;top:50%;margin:0;object-fit:contain;transform-origin:center;user-select:none}
.file-preview .source-view{display:flex;flex-direction:column;border:0;border-radius:0;height:100%;min-height:0}.file-preview .source-lines{min-height:0;max-height:none;flex:1;position:relative;font-size:13px}.file-preview .source-toolbar,.file-preview .source-search{font-size:12px;flex:none;gap:8px}.file-preview .source-search input{font-size:12px;width:100px;flex:1}.file-preview .source-search #source-matches{font-size:11px;white-space:nowrap}
.file-preview .source-line code{line-height:1.85}.file-preview .source-line.match{background:#fef3c7;color:#293b54}.file-preview .source-line.current-match{background:#fde68a;color:#1e293b}
:root[data-theme=dark] .file-preview .source-line.match{background:#453d21;color:#f9eabe}:root[data-theme=dark] .file-preview .source-line.current-match{background:#625020;color:#fff4c6}
.preview-table-scroll{overflow:auto;flex:1;min-height:0;overscroll-behavior:contain}.preview-data-table{border-collapse:separate;border-spacing:0;font-size:12px;min-width:100%;line-height:1.7}.preview-data-table th,.preview-data-table td{padding:9px 12px;border-bottom:1px solid var(--line);border-right:1px solid var(--line);text-align:left;vertical-align:top;white-space:pre-wrap;min-width:100px;max-width:350px;overflow-wrap:anywhere}.preview-data-table thead th{position:sticky;top:0;z-index:1;background:var(--surface-soft,#f5f7fa);font-weight:600}.preview-data-table tr>:first-child{min-width:38px;color:var(--muted);font-weight:400;text-align:right;background:var(--surface-soft,#f5f7fa)}
.file-preview .media-card{overflow:auto;border:0;border-radius:0;margin:auto;width:100%;max-height:100%;padding:16px}.file-preview .media-card video{max-height:100%;max-width:100%}.file-preview .media-card>.btn{margin-top:14px}
.preview-dialog{position:static;margin:0;padding:0;border:0;width:100%;height:100%;max-width:none;max-height:none;min-width:0;min-height:0;background:var(--surface,#fff);color:var(--ink)}
.preview-dialog[open]{display:flex;flex-direction:column}.preview-dialog>.file-preview{flex:1;min-height:0}
.preview-dialog-heading{display:none}.preview-dialog.preview-expanded .preview-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;border-bottom:1px solid var(--line);flex:none}.preview-dialog-heading h2{font-size:15px;min-width:0;overflow-wrap:anywhere}.preview-dialog-heading a{flex:none}
.preview-dialog.preview-expanded{position:fixed;inset:0;margin:auto;width:calc(100% - 40px);height:calc(100dvh - 40px);border:1px solid var(--line);border-radius:8px;overflow:hidden;overscroll-behavior:contain}.preview-dialog::backdrop{background:#0f172ab3;overflow:hidden;overscroll-behavior:contain}
@media(max-width:650px){.preview-stage.has-file-preview{height:460px;max-height:75vh;min-height:360px}.file-preview-tools{gap:6px;padding:8px}.file-preview-tools .btn.small,.image-controls .btn.small{padding:6px 8px}.preview-options{gap:5px}.preview-format{display:none}.preview-encoding{font-size:12px}.preview-encoding select{max-width:120px;font-size:12px}.file-preview .source-toolbar,.file-preview .source-search{padding:8px;gap:6px}.file-preview .source-search input{flex-basis:85px;min-width:75px}.preview-dialog.preview-expanded{width:100%;height:100dvh;border-radius:0}.preview-dialog-heading h2{font-size:14px}.preview-panel>.pipeline{padding:0 12px}.preview-status{font-size:12px}.file-preview .source-toolbar>b{flex-basis:100%;margin:0}}