nomadro/apps/miniprogram/xhs/tool/reader-md.css
eric 626f6b19e8 Ship unified miniprogram H5/weapp parity and XHS offline portal.
Align Taro pages with Next hub/nav/book/community/VIP, pack the single-index Xiaohongshu portal with host-chrome safe areas, and refresh shared book content plus portal README constraints.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 09:37:03 +08:00

165 lines
2.8 KiB
CSS

/* ===== reader-md.css — 从 apps/ebook/redmini/tool/styles.css 摘录(已验证可用) ===== */
.xhs-book-reader,
.xhs-book-reader .md-body {
--r-bg: #0c0b12;
--r-bg2: #15101f;
--r-text: #f3eefc;
--r-muted: #b4a9c8;
--r-accent: #ff7ab6;
--r-accent2: #a78bfa;
--r-soft: rgba(255, 255, 255, 0.06);
--r-border: rgba(255, 255, 255, 0.1);
--r-paper: rgba(28, 22, 45, 0.92);
}
.xhs-book-reader {
min-height: 100vh;
background: var(--r-bg);
color: var(--r-text);
padding: 0 0 calc(32px + env(safe-area-inset-bottom, 0px));
}
.xhs-book-reader .reader-chrome {
padding: 12px 16px 0;
}
.xhs-book-reader .chapter-head {
padding: 8px 18px 4px;
}
.xhs-book-reader .chapter-head h2 {
margin: 8px 0 4px;
font-size: 1.35rem;
font-weight: 800;
line-height: 1.3;
color: var(--r-text);
}
.xhs-book-reader .text-back {
border: none;
background: transparent;
color: var(--r-accent);
font-size: 0.95rem;
padding: 8px 0;
cursor: pointer;
}
.md-wrap {
padding: 0 18px 24px;
}
.md-body {
font-size: 16px;
line-height: 1.7;
color: var(--r-text);
word-break: break-word;
}
.md-body h2,
.md-body h3 {
margin: 1.2em 0 0.55em;
line-height: 1.35;
}
.md-body h2 {
font-size: 1.18em;
}
.md-body h3 {
font-size: 1.08em;
color: var(--r-muted);
}
.md-body p {
margin: 0 0 0.85em;
}
.md-body p.dropcap:first-letter,
.md-body .dropcap:first-letter {
float: left;
font-size: 2.4em;
line-height: 0.85;
padding: 0.08em 0.12em 0 0;
font-weight: 700;
color: var(--r-accent);
}
.md-quote {
margin: 10px 0;
padding: 10px 12px;
border-radius: 0 12px 12px 0;
background: var(--r-soft);
border-left: 3px solid var(--r-accent);
color: var(--r-muted);
font-style: italic;
}
.md-list {
margin: 0 0 0.85em;
padding-left: 1.1em;
}
.md-list div {
margin: 0.25em 0;
}
.md-code {
color: var(--r-accent2);
background: var(--r-soft);
padding: 0 4px;
border-radius: 4px;
font-size: 0.92em;
}
.md-pre {
margin: 12px 0;
padding: 12px;
border-radius: 10px;
background: var(--r-soft);
border: 1px solid var(--r-border);
overflow-x: auto;
font-size: 0.88em;
line-height: 1.5;
white-space: pre-wrap;
}
.md-hr {
border: 0;
border-top: 1px solid var(--r-border);
margin: 18px 0;
}
.md-table-wrap {
margin: 12px 0 16px;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
border-radius: 10px;
border: 1px solid var(--r-border);
}
.md-table {
width: 100%;
border-collapse: collapse;
font-size: 0.92em;
line-height: 1.45;
}
.md-table th,
.md-table td {
padding: 8px 10px;
text-align: left;
border-bottom: 1px solid var(--r-border);
vertical-align: top;
white-space: nowrap;
}
.md-table th {
background: var(--r-soft);
color: var(--r-accent);
font-weight: 600;
}
.md-table tr:last-child td {
border-bottom: 0;
}