Add workbench recompile, LaTeX assistance, and selectable preview

This commit is contained in:
gloamxun committed 2026-12-02 11:31:21 +08:00
1 parent aaf2550c68
commit e0d9b3a91f
12 files changed
+1059 -28

No files matched your search

+105
View File
@@ -0,0 +1,105 @@
.texrra-preview-controls {
display: flex;
flex: none;
flex-wrap: wrap;
justify-content: flex-end;
align-items: center;
gap: .35rem;
padding: .3rem .65rem;
background: #fff;
border-bottom: 1px solid #d9e0e6;
font: 13px/1.3 system-ui, sans-serif;
}
.texrra-preview-sticky {
position: sticky;
top: 0;
left: 0;
z-index: 1;
margin-bottom: .65rem;
}
.texrra-preview-controls button {
min-width: 1.9rem;
min-height: 1.9rem;
padding: .15rem .45rem;
border: 1px solid #cbd5df;
border-radius: .3rem;
background: #fff;
color: #17222d;
font: inherit;
cursor: pointer;
}
.texrra-preview-controls button:hover:not(:disabled),
.texrra-preview-controls button[aria-pressed="true"] {
background: #eaf1f7;
}
.texrra-preview-controls button:focus-visible {
outline: 2px solid #1972a4;
outline-offset: 2px;
}
.texrra-preview-controls button:disabled {
opacity: .48;
cursor: default;
}
.texrra-preview-controls output {
min-width: 3rem;
text-align: center;
font-variant-numeric: tabular-nums;
}
#pages.texrra-preview-pages {
--texrra-fit-width: 820px;
width: max(100%, var(--texrra-zoom-width, 0px));
grid-template-columns: minmax(0, var(--texrra-zoom-width, var(--texrra-fit-width)));
}
#pages.texrra-preview-web {
--texrra-fit-width: var(--page-width, 210mm);
}
.texrra-preview-page {
position: relative;
min-width: 0;
}
.texrra-preview-web > .texrra-preview-page {
width: min(100%, var(--texrra-zoom-width, var(--texrra-fit-width)));
}
#pages .texrra-preview-page > img {
display: block;
width: 100%;
user-select: none;
}
.texrra-preview-has-text {
container-type: inline-size;
}
.texrra-preview-text {
position: absolute;
inset: 0;
color: transparent;
forced-color-adjust: none;
pointer-events: none;
font: 1px/1 Arial, sans-serif;
user-select: text;
}
.texrra-preview-text > span {
position: absolute;
display: block;
white-space: pre;
transform-origin: left top;
pointer-events: auto;
}
.texrra-preview-text ::selection {
color: transparent;
background: #2978df59;
}