.wrn-viewer { color: var(--wrn-color-text); background: var(--wrn-color-surface); border: 1px solid var(--wrn-color-border); border-radius: var(--wrn-radius); overflow: hidden; min-width: 0; } .wrn-viewer-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.75rem; border-bottom: 1px solid var(--wrn-color-border); } .wrn-viewer-toolbar > span:first-child { /* Wide enough not to be crushed to one character per line by a full control set; it wraps onto its own row before that happens. */ flex: 1 1 10rem; min-width: 8rem; overflow-wrap: anywhere; } .wrn-viewer-toolbar > span { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; } /* The generic control look applies only to controls the package has not styled itself; without this it outranks every specific rule below. */ .wrn-viewer button:not([class*="wrn-viewer-"]), .wrn-viewer a:not([class*="wrn-viewer-"]) { font: inherit; color: var(--wrn-color-primary); background: var(--wrn-color-surface); border: 1px solid var(--wrn-color-border); border-radius: var(--wrn-radius); padding: 0.25rem 0.5rem; cursor: pointer; } .wrn-viewer :focus-visible { outline: 2px solid var(--wrn-color-primary); outline-offset: 2px; } .wrn-viewer-content { overflow: auto; max-height: 70vh; min-height: 8rem; padding: 1rem; } .wrn-viewer-content img, .wrn-viewer-content video { display: block; max-width: 100%; margin: auto; transform-origin: center; } .wrn-viewer-content audio { width: 100%; } .wrn-viewer-pdf { height: 65vh; } .wrn-viewer-note { margin: 0.5rem 0 0; font-size: 0.875em; color: var(--wrn-color-muted, inherit); } .wrn-viewer-content > pre { white-space: pre; margin: 0; } .wrn-viewer-code { height: 55vh; } .wrn-viewer:fullscreen .wrn-viewer-content { max-height: calc(100vh - 5rem); } .wrn-viewer-table { overflow: auto; max-width: 100%; border: 1px solid var(--wrn-color-border); border-radius: var(--wrn-radius); } .wrn-viewer-table table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; } .wrn-viewer-table th, .wrn-viewer-table td { height: 28px; padding: 0 0.75rem; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--wrn-color-border) 55%, transparent); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 24rem; } .wrn-viewer-table thead th { position: sticky; top: 0; z-index: 1; background: var(--wrn-color-surface); border-bottom: 1px solid var(--wrn-color-border); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--wrn-color-muted, inherit); } .wrn-viewer-table tbody tr:nth-child(even) td, .wrn-viewer-table tbody tr:nth-child(even) th { background: color-mix(in srgb, var(--wrn-color-text) 4%, transparent); } .wrn-viewer-table tbody tr:hover td, .wrn-viewer-table tbody tr:hover th { background: color-mix(in srgb, var(--wrn-color-primary) 10%, transparent); } /* The row-number column is scaffolding, not data. */ .wrn-viewer-table [data-viewer-index] { width: 1%; color: color-mix(in srgb, var(--wrn-color-text) 45%, transparent); font-weight: normal; text-align: right; text-transform: none; font-variant-numeric: tabular-nums; } /* Numbers line up on the right so magnitudes can be compared down a column. */ .wrn-viewer-table [data-viewer-numeric] { text-align: right; font-variant-numeric: tabular-nums; } .wrn-viewer-table [data-viewer-grow] { width: 100%; white-space: normal; overflow-wrap: anywhere; } .wrn-viewer-table tbody tr:last-child td, .wrn-viewer-table tbody tr:last-child th { border-bottom: 0; } .wrn-viewer-tree { font-family: var(--wrn-font-mono, ui-monospace, monospace); line-height: 1.6; } .wrn-viewer-branch { padding-left: 1rem; border-left: 1px solid var(--wrn-color-border); margin-left: 0.35rem; } .wrn-viewer-tree summary { cursor: pointer; } .wrn-viewer-key { color: var(--wrn-color-primary); } .wrn-viewer-leaf > span:first-child { color: var(--wrn-color-primary); } .wrn-viewer-string { color: var(--wrn-color-success, var(--wrn-color-text)); } .wrn-viewer-number, .wrn-viewer-boolean, .wrn-viewer-null { color: var(--wrn-color-accent, var(--wrn-color-text)); } .wrn-viewer-frame { display: block; width: 100%; height: 60vh; border: 0; background: var(--wrn-color-surface); } .wrn-viewer-tabs { display: inline-flex; flex-wrap: wrap; gap: 0.125rem; margin-bottom: 0.75rem; padding: 0.187rem; border-radius: calc(var(--wrn-radius) + 0.187rem); background: color-mix(in srgb, var(--wrn-color-text) 6%, transparent); } .wrn-viewer-tabs button { border: 0; background: transparent; color: var(--wrn-color-muted, inherit); padding: 0.3rem 0.75rem; font-size: 0.875rem; font-weight: 500; } .wrn-viewer-tabs button:hover { color: var(--wrn-color-text); } .wrn-viewer-tabs button[aria-selected="true"] { background: var(--wrn-color-primary); color: var(--wrn-color-on-primary, #fff); font-weight: 600; } .wrn-viewer-pages { display: grid; gap: 1rem; justify-items: center; } .wrn-viewer-page { display: block; border: 1px solid var(--wrn-color-border); border-radius: var(--wrn-radius); } .wrn-viewer-filmstrip { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.75rem; border-top: 1px solid var(--wrn-color-border); } .wrn-viewer-file { flex: 0 0 9rem; display: grid; gap: 0.5rem; overflow-wrap: anywhere; } .wrn-viewer-file[aria-pressed="true"] { outline: 2px solid var(--wrn-color-primary); outline-offset: -2px; } .wrn-viewer-file img { width: 100%; height: 5rem; object-fit: contain; } .wrn-viewer-waveform { width: 100%; max-height: 6rem; display: block; margin-top: 0.75rem; } .wrn-viewer input[type="range"] { width: 100%; accent-color: var(--wrn-color-primary); } .wrn-viewer-toolbar details { flex-basis: 100%; max-width: 100%; } .wrn-viewer-toolbar details pre { max-height: 20rem; overflow: auto; white-space: pre-wrap; } .wrn-viewer [data-viewer-mount] { min-width: 0; } .wrn-viewer-slides { display: grid; gap: 0.875rem; outline: none; } .wrn-viewer-slides:focus-visible .wrn-viewer-slide { outline: 2px solid var(--wrn-color-primary); outline-offset: 3px; } .wrn-viewer-slide { display: flex; flex-direction: column; gap: 0.75rem; min-height: 16rem; padding: 2rem 2.25rem; border: 1px solid var(--wrn-color-border); border-radius: calc(var(--wrn-radius) * 1.5); background: color-mix(in srgb, var(--wrn-color-text) 3%, var(--wrn-color-surface)); } .wrn-viewer-slide h2 { margin: 0; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em; } .wrn-viewer-slide h2::after { content: ""; display: block; width: 2.5rem; height: 3px; margin-top: 0.6rem; border-radius: 2px; background: var(--wrn-color-primary); } .wrn-viewer-slide ul { margin: 0; padding-left: 1.35rem; display: grid; gap: 0.4rem; font-size: 1.0625rem; line-height: 1.5; list-style: disc outside; } .wrn-viewer-slide li { list-style: inherit; } .wrn-viewer-slide li::marker { color: var(--wrn-color-primary); } .wrn-viewer-slide-notes { margin-top: 1rem; border-top: 1px solid var(--wrn-color-border); padding-top: 0.5rem; } .wrn-viewer-document { max-width: 46rem; margin: 0 auto; line-height: 1.6; } .wrn-viewer-document p { margin: 0 0 0.75rem; } .wrn-viewer-document ul { margin: 0 0 0.75rem; padding-left: 1.35rem; list-style: disc outside; } .wrn-viewer-document li { list-style: inherit; margin-bottom: 0.25rem; } .wrn-viewer-document li::marker { color: var(--wrn-color-primary); } /* Heading levels have to read as levels; the document is the only structure. */ .wrn-viewer-document h1 { margin: 0 0 0.75rem; font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.01em; } .wrn-viewer-document h2 { margin: 1.75rem 0 0.6rem; font-size: 1.25rem; line-height: 1.3; } .wrn-viewer-document h3 { margin: 1.25rem 0 0.5rem; font-size: 1.0625rem; color: var(--wrn-color-muted, inherit); text-transform: uppercase; letter-spacing: 0.04em; } .wrn-viewer-document h4, .wrn-viewer-document h5, .wrn-viewer-document h6 { margin: 1rem 0 0.4rem; font-size: 1rem; } .wrn-viewer-document h1:first-child, .wrn-viewer-document h2:first-child { margin-top: 0; } .wrn-viewer-action { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; box-sizing: border-box; width: 2rem; height: 2rem; padding: 0; /* A link and a button must sit on the same line: page styles commonly give one of them a margin the other does not have. */ margin: 0; line-height: 1; text-decoration: none; position: relative; color: var(--wrn-color-text); background: transparent; border: 1px solid transparent; border-radius: var(--wrn-radius); cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; } .wrn-viewer-action:hover, .wrn-viewer-action:focus-visible { color: var(--wrn-color-primary); border-color: var(--wrn-color-border); background: color-mix(in srgb, var(--wrn-color-primary) 10%, transparent); } .wrn-viewer-action[aria-pressed="true"] { color: var(--wrn-color-on-primary, var(--wrn-color-surface)); background: var(--wrn-color-primary); border-color: var(--wrn-color-primary); } .wrn-viewer-icon { width: 1.125rem; height: 1.125rem; } .wrn-viewer-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; } .wrn-viewer-action[data-tooltip]::after { content: attr(data-tooltip); position: absolute; top: calc(100% + 0.4rem); left: 50%; transform: translateX(-50%) translateY(-0.15rem); z-index: 5; padding: 0.2rem 0.45rem; border-radius: var(--wrn-radius); background: var(--wrn-color-text); color: var(--wrn-color-surface); font-size: 0.75rem; line-height: 1.3; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.12s ease, transform 0.12s ease; } .wrn-viewer-action[data-tooltip]:hover::after, .wrn-viewer-action[data-tooltip]:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0); } @media (prefers-reduced-motion: reduce) { .wrn-viewer-action, .wrn-viewer-action[data-tooltip]::after { transition: none; } } .wrn-viewer-download { display: grid; place-items: center; gap: 0.75rem; min-height: 14rem; padding: 2rem 1rem; text-align: center; } .wrn-viewer-download-art { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; color: var(--wrn-color-primary); background: color-mix(in srgb, var(--wrn-color-primary) 12%, transparent); } .wrn-viewer-download-art svg { width: 2rem; height: 2rem; } .wrn-viewer-download-reason { margin: 0; font-size: 1.0625rem; font-weight: 600; } .wrn-viewer-download-meta { margin: 0; font-size: 0.875rem; color: var(--wrn-color-muted, inherit); overflow-wrap: anywhere; } .wrn-viewer-player { display: grid; gap: 0.5rem; padding: 1rem; border: 1px solid var(--wrn-color-border); border-radius: calc(var(--wrn-radius) * 1.5); background: color-mix(in srgb, var(--wrn-color-text) 3%, var(--wrn-color-surface)); } .wrn-viewer-player-transport { display: flex; align-items: center; gap: 0.75rem; } .wrn-viewer-play { width: 2.75rem; height: 2.75rem; flex: 0 0 auto; color: var(--wrn-color-on-primary, var(--wrn-color-surface)); background: var(--wrn-color-primary); border-color: var(--wrn-color-primary); } .wrn-viewer-play:hover, .wrn-viewer-play:focus-visible { color: var(--wrn-color-on-primary, var(--wrn-color-surface)); background: color-mix(in srgb, var(--wrn-color-primary) 85%, black); border-color: transparent; } .wrn-viewer-play .wrn-viewer-icon { width: 1.375rem; height: 1.375rem; } .wrn-viewer-time { flex: 0 0 auto; font-size: 0.8125rem; font-variant-numeric: tabular-nums; color: var(--wrn-color-muted, inherit); } /* The waveform is the track: envelope and progress are one control. */ .wrn-viewer-track { position: relative; flex: 1 1 auto; min-width: 0; height: 2.75rem; border-radius: var(--wrn-radius); background: color-mix(in srgb, var(--wrn-color-text) 8%, transparent); overflow: hidden; } .wrn-viewer-track .wrn-viewer-waveform { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 0.25s ease; } .wrn-viewer-track .wrn-viewer-waveform.is-ready { opacity: 0.5; } /* The played part of the envelope reads at full strength. */ .wrn-viewer-progress .wrn-viewer-waveform { opacity: 1; } .wrn-viewer-progress { position: absolute; inset: 0 auto 0 0; width: 0; background: color-mix(in srgb, var(--wrn-color-primary) 22%, transparent); border-right: 2px solid var(--wrn-color-primary); pointer-events: none; } .wrn-viewer-track:hover .wrn-viewer-progress { background: color-mix(in srgb, var(--wrn-color-primary) 30%, transparent); } .wrn-viewer-seek { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; } .wrn-viewer-seek:focus-visible { opacity: 1; } .wrn-viewer-print-title { margin: 0 0 1rem; font-size: 1.125rem; font-weight: 600; } [data-viewer-print-root] { display: none; } @media print { [data-viewer-printing-active] body > *:not([data-viewer-print-root]) { display: none !important; } [data-viewer-print-root] { display: block; } [data-viewer-print-root] .wrn-viewer-content, [data-viewer-print-root] .wrn-viewer-table { max-height: none; overflow: visible; border: 0; } [data-viewer-print-root] .wrn-viewer-slide-strip, [data-viewer-print-root] .wrn-viewer-tabs, [data-viewer-print-root] .wrn-viewer-player-transport { display: none; } } /* Caption above a table or listing: context, not content. */ .wrn-viewer-content > p:first-child:not(.wrn-viewer-note):not(.wrn-viewer-download-reason) { margin: 0 0 0.6rem; font-size: 0.8125rem; color: var(--wrn-color-muted, inherit); } /* Pager: a dot per slide, arrows either side, position on the right. */ .wrn-viewer-pager { display: flex; align-items: center; justify-content: center; gap: 0.75rem; } .wrn-viewer-pager-step { display: inline-flex; align-items: center; justify-content: center; width: 1.875rem; height: 1.875rem; padding: 0; margin: 0; color: var(--wrn-color-text); background: transparent; border: 1px solid var(--wrn-color-border); border-radius: 50%; cursor: pointer; } .wrn-viewer-pager-step:hover:not(:disabled) { color: var(--wrn-color-primary); border-color: var(--wrn-color-primary); } .wrn-viewer-pager-step:disabled { opacity: 0.35; cursor: default; } .wrn-viewer-pager-step .wrn-viewer-icon { width: 1rem; height: 1rem; } .wrn-viewer-dots { display: flex; align-items: center; gap: 0.375rem; max-width: 60%; overflow-x: auto; padding: 0.25rem; } .wrn-viewer-dot { flex: 0 0 auto; width: 0.5rem; height: 0.5rem; padding: 0; margin: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--wrn-color-text) 25%, transparent); cursor: pointer; transition: width 0.18s ease, background-color 0.18s ease; } .wrn-viewer-dot:hover { background: color-mix(in srgb, var(--wrn-color-primary) 60%, transparent); } .wrn-viewer-dot[aria-current="true"] { width: 1.5rem; border-radius: 0.25rem; background: var(--wrn-color-primary); } .wrn-viewer-pager-count { font-size: 0.8125rem; font-variant-numeric: tabular-nums; color: var(--wrn-color-muted, inherit); } @media (prefers-reduced-motion: reduce) { .wrn-viewer-dot { transition: none; } } /* Workbook: a scrolling grid with the sheet bar fixed beneath it. */ .wrn-viewer-workbook { display: grid; grid-template-rows: 1fr auto; min-height: 0; border: 1px solid var(--wrn-color-border); border-radius: var(--wrn-radius); overflow: hidden; } .wrn-viewer-workbook-surface { overflow: auto; max-height: 60vh; } .wrn-viewer-sheetbar { display: flex; align-items: center; gap: 0.125rem; padding: 0.25rem 0.5rem; overflow-x: auto; border-top: 1px solid var(--wrn-color-border); background: color-mix(in srgb, var(--wrn-color-text) 6%, transparent); } .wrn-viewer-sheetbar.is-single .wrn-viewer-sheettab { display: none; } .wrn-viewer-sheettab { flex: 0 0 auto; margin: 0; padding: 0.3rem 0.85rem; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; color: var(--wrn-color-muted, inherit); background: transparent; border: 1px solid transparent; border-bottom: 0; border-radius: var(--wrn-radius) var(--wrn-radius) 0 0; cursor: pointer; } .wrn-viewer-sheettab:hover { color: var(--wrn-color-text); } /* The active tab joins the sheet above it, as a spreadsheet tab does. */ .wrn-viewer-sheettab[aria-selected="true"] { color: var(--wrn-color-text); font-weight: 600; background: var(--wrn-color-surface); border-color: var(--wrn-color-border); box-shadow: 0 -2px 0 0 var(--wrn-color-primary) inset; } .wrn-viewer-sheetbar-status { margin-left: auto; padding-left: 0.75rem; font-size: 0.75rem; white-space: nowrap; color: var(--wrn-color-muted, inherit); } /* The spreadsheet grid: lettered columns, numbered rows, ruled cells. */ .wrn-viewer-sheet table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.875rem; font-variant-numeric: tabular-nums; } .wrn-viewer-sheet th, .wrn-viewer-sheet td { height: 28px; padding: 0 0.6rem; border-right: 1px solid color-mix(in srgb, var(--wrn-color-border) 60%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--wrn-color-border) 60%, transparent); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22rem; } .wrn-viewer-sheet thead th { position: sticky; top: 0; z-index: 2; height: 24px; font-size: 0.75rem; font-weight: 500; text-align: center; color: var(--wrn-color-muted, inherit); background: color-mix(in srgb, var(--wrn-color-text) 8%, var(--wrn-color-surface)); border-bottom: 1px solid var(--wrn-color-border); } /* The row-number gutter stays put while the grid scrolls sideways. */ .wrn-viewer-sheet [data-viewer-index] { position: sticky; left: 0; z-index: 1; width: 1%; min-width: 2.75rem; text-align: center; font-size: 0.75rem; font-weight: 500; color: var(--wrn-color-muted, inherit); background: color-mix(in srgb, var(--wrn-color-text) 8%, var(--wrn-color-surface)); border-right: 1px solid var(--wrn-color-border); } .wrn-viewer-sheet thead [data-viewer-index] { z-index: 3; } .wrn-viewer-sheet [data-viewer-numeric] { text-align: right; } .wrn-viewer-sheet [data-viewer-labels] td { font-weight: 600; background: color-mix(in srgb, var(--wrn-color-text) 4%, transparent); } .wrn-viewer-sheet tbody tr:hover td { background: color-mix(in srgb, var(--wrn-color-primary) 9%, transparent); } /* Image and video sit on a stage, so the media's bounds are visible. */ .wrn-viewer-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 12rem; padding: 1rem; border-radius: var(--wrn-radius); background: linear-gradient( 45deg, color-mix(in srgb, var(--wrn-color-text) 7%, transparent) 25%, transparent 25% ), linear-gradient( -45deg, color-mix(in srgb, var(--wrn-color-text) 7%, transparent) 25%, transparent 25% ), linear-gradient( 45deg, transparent 75%, color-mix(in srgb, var(--wrn-color-text) 7%, transparent) 75% ), linear-gradient( -45deg, transparent 75%, color-mix(in srgb, var(--wrn-color-text) 7%, transparent) 75% ); background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; } .wrn-viewer-stage img { display: block; max-width: 100%; box-shadow: 0 1px 12px rgb(0 0 0 / 0.35); } .wrn-viewer-stage video { display: block; max-width: 100%; max-height: 60vh; border-radius: var(--wrn-radius); background: #000; } .wrn-viewer-zoom { position: absolute; right: 0.5rem; bottom: 0.5rem; padding: 0.15rem 0.45rem; border-radius: var(--wrn-radius); font-size: 0.75rem; font-variant-numeric: tabular-nums; color: var(--wrn-color-surface); background: color-mix(in srgb, var(--wrn-color-text) 75%, transparent); pointer-events: none; } /* A preview opened over the page. The dialog itself is the backdrop area, so a click that lands on it rather than on the viewer closes the overlay. */ .wrn-viewer-dialog { width: min(72rem, 94vw); max-width: none; max-height: 92vh; padding: 0; border: 0; background: transparent; overflow: visible; } .wrn-viewer-dialog::backdrop { background: rgb(0 0 0 / 0.65); backdrop-filter: blur(2px); } .wrn-viewer-dialog .wrn-viewer { max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 0.5); } /* Covering the page without the Fullscreen API, so it needs no gesture. */ .wrn-viewer-expanded { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; margin: 0; border-radius: 0; border: 0; background: var(--wrn-color-surface); } /* A whole page given over to one preview: no card, fill what is available. */ .wrn-viewer-as-page { display: flex; flex-direction: column; height: 100%; min-height: 0; border: 0; border-radius: 0; background: transparent; } .wrn-viewer-as-page .wrn-viewer-toolbar { padding-left: 0; padding-right: 0; } /* `Viewer.wrn` renders the toolbar and content inside a shell, so the growing box is two levels down: every wrapper between has to flex for the content to fill the space these modes hand it. */ .wrn-viewer-dialog .wrn-viewer > *:not(noscript), .wrn-viewer-expanded > *:not(noscript), .wrn-viewer-as-page > *:not(noscript), .wrn-viewer-dialog .wrn-viewer-shell, .wrn-viewer-expanded .wrn-viewer-shell, .wrn-viewer-as-page .wrn-viewer-shell { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; } .wrn-viewer-dialog .wrn-viewer-content, .wrn-viewer-expanded .wrn-viewer-content, .wrn-viewer-as-page .wrn-viewer-content { flex: 1 1 auto; max-height: none; min-height: 0; }