/* * Typography * * `.dou-prose` styles rendered Markdown and other long-form HTML: plain * elements with no classes. Headings are ink, body text one step softer, * links ink with a faint underline like Link. Code sits on the same faint * tint as everything recessed; tables and rules are hairlines. * * The rules are scoped: they stop at any DouUI component (any `dou-` * class) and at `.dou-not-prose`, so live demos keep their own look, and * `:where()` keeps them at zero specificity, so a class always wins. */ @layer dou.components { .dou-prose { color: var(--dou-color-text-secondary); font-size: 16px; line-height: 1.75; overflow-wrap: break-word; } @scope (.dou-prose) to (.dou-not-prose, [class*='dou-']:not(.dou-prose)) { :where(h1) { margin: 0 0 24px; color: var(--dou-color-text); font-size: 30px; font-weight: var(--dou-font-weight-bold); letter-spacing: -0.01em; line-height: 1.3; } :where(h2) { padding-top: 24px; margin: 48px 0 16px; border-top: 1px solid var(--dou-color-border-subtle); color: var(--dou-color-text); font-size: 22px; font-weight: var(--dou-font-weight-bold); line-height: 1.4; } :where(h3) { margin: 32px 0 12px; color: var(--dou-color-text); font-size: 18px; font-weight: var(--dou-font-weight-bold); line-height: 1.5; } :where(h4), :where(h5), :where(h6) { margin: 24px 0 8px; color: var(--dou-color-text); font-size: 16px; font-weight: var(--dou-font-weight-bold); line-height: 1.6; } :where(p) { margin: 16px 0; } :where(a) { color: var(--dou-color-text); font-weight: var(--dou-font-weight-medium); text-decoration-line: underline; text-decoration-color: color-mix(in oklab, var(--dou-color-text) 28%, transparent); text-decoration-thickness: 1px; text-underline-offset: 0.25em; transition: text-decoration-color var(--dou-motion-duration-fast) var(--dou-motion-easing); } :where(a:hover) { text-decoration-color: var(--dou-color-text); } :where(a:focus-visible) { border-radius: 2px; outline: 2px solid var(--dou-color-focus); outline-offset: 2px; } :where(strong), :where(b) { color: var(--dou-color-text); font-weight: var(--dou-font-weight-bold); } :where(ul), :where(ol) { padding-left: 1.375em; margin: 16px 0; } :where(ul) { list-style: disc; } :where(ol) { list-style: decimal; } :where(li) { padding-left: 0.25em; } :where(li + li) { margin-top: 6px; } :where(li)::marker { color: var(--dou-color-text-tertiary); } :where(li > ul), :where(li > ol) { margin: 6px 0; } :where(blockquote) { padding-left: 16px; margin: 20px 0; border-left: 2px solid var(--dou-color-border-strong); color: var(--dou-color-text-tertiary); } :where(code) { padding: 0.15em 0.4em; border-radius: 4px; background-color: color-mix(in oklab, var(--dou-color-text) 6%, transparent); color: var(--dou-color-text); font-family: var(--dou-font-family-mono); font-size: 0.875em; overflow-wrap: break-word; } :where(pre) { margin: 20px 0; padding: 16px 20px; overflow-x: auto; border: 1px solid var(--dou-color-border-subtle); border-radius: var(--dou-radius-container); background-color: color-mix( in oklab, var(--dou-color-text) 2.5%, var(--dou-color-bg-surface) ); font-family: var(--dou-font-family-mono); font-size: 13px; line-height: 1.7; tab-size: 2; } :where(pre code) { padding: 0; border-radius: 0; background: transparent; color: inherit; font-size: inherit; overflow-wrap: normal; } :where(table) { display: block; max-width: 100%; margin: 20px 0; overflow-x: auto; border-collapse: collapse; font-size: var(--dou-font-size-md); line-height: 1.6; } :where(th), :where(td) { padding: 8px 12px; border-bottom: 1px solid var(--dou-color-border-subtle); text-align: left; vertical-align: top; } :where(th) { border-bottom-color: var(--dou-color-border); color: var(--dou-color-text); font-weight: var(--dou-font-weight-medium); white-space: nowrap; } :where(hr) { height: 0; margin: 40px 0; border: 0; border-top: 1px solid var(--dou-color-border); } :where(img), :where(video) { max-width: 100%; height: auto; border-radius: var(--dou-radius-control); } :where(figure) { margin: 24px 0; } :where(figcaption) { margin-top: 8px; color: var(--dou-color-text-tertiary); font-size: var(--dou-font-size-sm); text-align: center; } :where(dt) { color: var(--dou-color-text); font-weight: var(--dou-font-weight-medium); } :where(dd) { margin: 4px 0 12px 1.375em; } :where(mark) { padding: 0 0.15em; border-radius: 2px; background-color: color-mix(in oklab, var(--dou-color-warning) 22%, transparent); color: inherit; } :where(:scope > :first-child) { margin-top: 0; } :where(:scope > :last-child) { margin-bottom: 0; } } }