AISummary-Cloudflare/public/summary.css

179 lines
4.2 KiB
CSS

.post-summary {
--ps-surface: #ffffff;
--ps-text: #111827;
--ps-muted: #6b7280;
--ps-border: rgba(17, 24, 39, 0.12);
--ps-content-bg: #f8fafc;
--ps-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
--ps-radius: 16px;
--ps-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
"Courier New", monospace;
--ps-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue",
Arial, "Noto Sans", "Liberation Sans", sans-serif;
--ps-btn-bg: rgba(17, 24, 39, 0.04);
--ps-btn-bg-active: rgba(124, 92, 255, 0.14);
--ps-btn-border-active: rgba(124, 92, 255, 0.55);
--ps-style-tldr: rgba(124, 92, 255, 0.9);
--ps-style-bullets: rgba(34, 197, 94, 0.9);
--ps-style-outline: rgba(245, 158, 11, 0.95);
--ps-style-keywords: rgba(59, 130, 246, 0.9);
box-sizing: border-box;
font-family: var(--ps-sans);
color: var(--ps-text);
line-height: 1.55;
background: var(--ps-surface);
border: 1px solid var(--ps-border);
border-radius: var(--ps-radius);
box-shadow: var(--ps-shadow);
padding: 18px 18px;
backdrop-filter: blur(10px);
display: flex;
flex-direction: column;
gap: 12px;
}
.post-summary[data-theme="dark"] {
--ps-surface: #0b1020;
--ps-text: rgba(255, 255, 255, 0.92);
--ps-muted: rgba(255, 255, 255, 0.65);
--ps-border: rgba(255, 255, 255, 0.14);
--ps-content-bg: rgba(0, 0, 0, 0.22);
--ps-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
--ps-btn-bg: rgba(255, 255, 255, 0.06);
}
.post-summary[data-theme="light"] {
--ps-surface: #ffffff;
--ps-text: #111827;
--ps-muted: #6b7280;
--ps-border: rgba(17, 24, 39, 0.12);
--ps-content-bg: #f8fafc;
--ps-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
--ps-btn-bg: rgba(17, 24, 39, 0.04);
}
@media (prefers-color-scheme: dark) {
.post-summary:not([data-theme="light"]) {
--ps-surface: #0b1020;
--ps-text: rgba(255, 255, 255, 0.92);
--ps-muted: rgba(255, 255, 255, 0.65);
--ps-border: rgba(255, 255, 255, 0.14);
--ps-content-bg: rgba(0, 0, 0, 0.22);
--ps-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
--ps-btn-bg: rgba(255, 255, 255, 0.06);
}
}
.post-summary :where(*, *::before, *::after) {
box-sizing: border-box;
}
.post-summary :where(code) {
font-family: var(--ps-mono);
font-size: 0.95em;
padding: 0 0.35em;
border: 1px solid var(--ps-border);
border-radius: 8px;
background: rgba(127, 127, 127, 0.12);
}
.post-summary__muted {
color: var(--ps-muted);
}
.post-summary__header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.post-summary__title {
font-weight: 650;
letter-spacing: 0.2px;
}
.post-summary__styles {
display: flex;
flex-wrap: wrap;
gap: 8px;
justify-content: flex-end;
}
.post-summary__styles button {
appearance: none;
border: 1px solid var(--ps-border);
background: var(--ps-btn-bg);
color: var(--ps-text);
padding: 6px 10px;
border-radius: 999px;
cursor: pointer;
font-size: 13px;
}
.post-summary__styles button[aria-pressed="true"] {
border-color: var(--ps-btn-border-active);
background: var(--ps-btn-bg-active);
}
.post-summary__body {
display: grid;
gap: 10px;
}
.post-summary__status {
font-size: 13px;
}
.post-summary__content {
padding: 14px 14px;
border: 1px solid var(--ps-border);
border-radius: 14px;
background: var(--ps-content-bg);
min-height: 120px;
white-space: pre-wrap;
}
.post-summary:not([data-expanded="true"]) .post-summary__content {
display: none;
}
.post-summary__content :where(ul) {
margin: 0;
padding-left: 18px;
display: grid;
gap: 6px;
}
.post-summary__content :where(h4) {
margin: 10px 0 6px;
font-size: 14px;
letter-spacing: 0.2px;
}
.post-summary__content :where(p) {
margin: 0 0 8px;
color: var(--ps-text);
}
.post-summary[data-style="tldr"] .post-summary__content {
border-left: 4px solid var(--ps-style-tldr);
}
.post-summary[data-style="bullets"] .post-summary__content {
border-left: 4px solid var(--ps-style-bullets);
}
.post-summary[data-style="outline"] .post-summary__content {
border-left: 4px solid var(--ps-style-outline);
}
.post-summary[data-style="keywords"] .post-summary__content {
border-left: 4px solid var(--ps-style-keywords);
font-family: var(--ps-mono);
}