indra-ocr-wasm / app.css
apirela17's picture
Deploy indra-ocr-wasm 0.1.0
4f843d0 verified
Raw History Blame Contribute Delete
4.27 kB
main {
max-width: 48rem;
margin: 0 auto;
padding: 3.5rem 1rem 2.5rem;
display: grid;
gap: 1rem;
}
label {
font-size: 0.875rem;
font-weight: 550;
color: var(--ink-soft);
}
.wordmark {
font-size: 1.375rem;
font-weight: 650;
letter-spacing: -0.02em;
}
/* Indra OCR's wordmark: OCR in Datalab's blue. */
.ocr {
color: #2f6fde;
}
.metrics {
margin: 0;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(7.75rem, 1fr));
gap: 0.625rem;
}
.metrics > div {
background: var(--surface);
border-radius: 0.875rem;
padding: 0.75rem 0.875rem;
display: grid;
gap: 0.125rem;
align-content: start;
}
.metrics dt {
font-size: 0.75rem;
font-weight: 550;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--ink-faint);
}
.metrics dd {
margin: 0;
}
.metrics dd:not(.muted) {
font-size: 1.5rem;
font-weight: 650;
letter-spacing: -0.02em;
font-variant-numeric: tabular-nums;
}
.metrics dd.muted {
font-size: 0.75rem;
line-height: 1.35;
}
code {
font-family: ui-monospace, "SF Mono", Menlo, monospace;
font-size: 0.85em;
}
.dot {
display: inline-block;
width: 0.5rem;
height: 0.5rem;
margin-right: 0.5rem;
border-radius: 50%;
background: currentColor;
vertical-align: 0.1em;
}
.source[data-phase="reading"] .dot {
animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
50% {
opacity: 0.3;
}
}
.source .row {
justify-content: flex-start;
}
.drop {
position: relative;
display: grid;
place-items: center;
min-height: 9rem;
border: 1px dashed var(--hairline);
border-radius: 0.875rem;
background: var(--surface);
overflow: hidden;
cursor: pointer;
}
.drop[data-disabled="true"] {
cursor: not-allowed;
}
.drop:focus-within {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.drop input {
position: absolute;
width: 1px;
height: 1px;
opacity: 0;
pointer-events: none;
}
#preview {
display: block;
max-width: 100%;
max-height: 22rem;
object-fit: contain;
}
.drop[data-empty="true"] #preview {
display: none;
}
.drop[data-empty="false"] .hint {
display: none;
}
.hint {
color: var(--ink-faint);
font-size: 0.9rem;
}
/* A scan line sweeps the image while the engine reads it. */
.source[data-phase="reading"] .drop::after {
content: "";
position: absolute;
inset: 0 0 auto;
height: 3px;
background: var(--accent);
opacity: 0.7;
animation: scan 1.6s ease-in-out infinite alternate;
}
@keyframes scan {
to {
translate: 0 calc(22rem - 3px);
}
}
.option {
display: flex;
align-items: center;
gap: 0.5rem;
cursor: pointer;
}
.option input:disabled,
.option:has(input:disabled) {
cursor: not-allowed;
}
.answer {
gap: 1.25rem;
}
/* The page's Markdown drawn block by block: headings, text as written, tables as tables. */
.blocks {
display: grid;
gap: 0.875rem;
max-height: 32rem;
overflow-y: auto;
}
.blocks:empty {
display: none;
}
.prose {
overflow-wrap: anywhere;
font-size: 1.0625rem;
}
/* A text block's lines as written; the template's own whitespace around them collapses. */
.segment {
white-space: pre-wrap;
}
.text {
margin: 0;
white-space: pre-wrap;
overflow-wrap: anywhere;
font-family: ui-monospace, "SF Mono", Menlo, monospace;
font-size: 0.8125rem;
}
.heading {
margin: 0.5rem 0 0;
font-size: 1.25rem;
font-weight: 650;
letter-spacing: -0.01em;
}
.formula {
overflow-x: auto;
overflow-y: hidden;
}
.formula .katex-display {
margin: 0;
}
/* The Markdown as written, to copy, and the lines as read. */
.markdown summary {
cursor: pointer;
font-size: 0.875rem;
font-weight: 550;
color: var(--ink-soft);
}
.markdown .text {
margin-top: 0.5rem;
max-height: 14rem;
overflow-y: auto;
color: var(--ink-faint);
}
.table-wrap {
overflow-x: auto;
}
table {
border-collapse: collapse;
font-size: 0.9375rem;
}
td {
border: 1px solid var(--hairline);
padding: 0.375rem 0.625rem;
vertical-align: top;
}
.placeholder {
margin: 0;
}
.lines {
margin: 0.5rem 0 0;
padding-left: 1.75rem;
max-height: 14rem;
overflow-y: auto;
font-size: 0.875rem;
}
.lines li {
display: flex;
justify-content: space-between;
gap: 1rem;
}
.line-text {
overflow-wrap: anywhere;
}