217 lines
4.1 KiB
CSS
217 lines
4.1 KiB
CSS
/* Markdown Content Page */
|
||
|
||
/* ------------------------------------------------------------------
|
||
Markdown Content Styling (GitHub-like) - Scoped to .content-page
|
||
------------------------------------------------------------------ */
|
||
|
||
/* Increase inner spacing for content pages to separate text from card border */
|
||
.content-category .content-page {
|
||
padding-left: var(--spacing-sm);
|
||
padding-right: var(--spacing-sm);
|
||
}
|
||
|
||
@media (max-width: 480px) {
|
||
.content-category .content-page {
|
||
padding-left: var(--spacing-xs);
|
||
padding-right: var(--spacing-xs);
|
||
}
|
||
}
|
||
|
||
.content-page {
|
||
font-family: var(
|
||
--font-body,
|
||
-apple-system,
|
||
BlinkMacSystemFont,
|
||
'Segoe UI',
|
||
'Noto Sans',
|
||
Helvetica,
|
||
Arial,
|
||
sans-serif,
|
||
'Apple Color Emoji',
|
||
'Segoe UI Emoji'
|
||
);
|
||
font-size: 16px;
|
||
line-height: 1.6;
|
||
color: var(--text-color);
|
||
word-wrap: break-word;
|
||
padding-bottom: 2rem;
|
||
}
|
||
|
||
.content-page h1,
|
||
.content-page h2,
|
||
.content-page h3,
|
||
.content-page h4,
|
||
.content-page h5,
|
||
.content-page h6 {
|
||
margin-top: 24px;
|
||
margin-bottom: 16px;
|
||
font-weight: 600;
|
||
line-height: 1.25;
|
||
color: var(--text-bright);
|
||
}
|
||
|
||
.content-page h1 {
|
||
font-size: 2em;
|
||
padding-bottom: 0.3em;
|
||
border-bottom: 1px solid var(--border-color);
|
||
}
|
||
|
||
.content-page h2 {
|
||
font-size: 1.5em;
|
||
padding-bottom: 0.3em;
|
||
border-bottom: 1px solid var(--border-color);
|
||
}
|
||
|
||
.content-page h3 {
|
||
font-size: 1.25em;
|
||
}
|
||
|
||
.content-page h4 {
|
||
font-size: 1em;
|
||
}
|
||
|
||
.content-page h5 {
|
||
font-size: 0.875em;
|
||
}
|
||
|
||
.content-page h6 {
|
||
font-size: 0.85em;
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
.content-page p {
|
||
margin-top: 0;
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
.content-page blockquote {
|
||
margin: 0 0 16px;
|
||
padding: 0 1em;
|
||
color: var(--text-muted);
|
||
border-left: 0.25em solid var(--border-color);
|
||
background-color: transparent;
|
||
}
|
||
|
||
.content-page ul,
|
||
.content-page ol {
|
||
margin-top: 0;
|
||
margin-bottom: 16px;
|
||
padding-left: 2em;
|
||
}
|
||
|
||
.content-page li + li {
|
||
margin-top: 0.25em;
|
||
}
|
||
|
||
/* Inline code */
|
||
.content-page code {
|
||
font-family:
|
||
ui-monospace,
|
||
SFMono-Regular,
|
||
SF Mono,
|
||
Menlo,
|
||
Consolas,
|
||
Liberation Mono,
|
||
monospace;
|
||
font-size: 85%;
|
||
padding: 0.2em 0.4em;
|
||
margin: 0;
|
||
border-radius: var(--radius-sm);
|
||
background-color: rgba(127, 127, 127, 0.15);
|
||
color: var(--text-bright);
|
||
}
|
||
|
||
/* Block code (pre) */
|
||
.content-page pre {
|
||
padding: 16px;
|
||
overflow: auto;
|
||
font-size: 85%;
|
||
line-height: 1.45;
|
||
/* 代码块背景需要与内容卡片区分开:避免与 card-bg 过于接近 */
|
||
background-color: rgba(127, 127, 127, 0.08);
|
||
border-radius: var(--radius-md);
|
||
margin-top: 0;
|
||
margin-bottom: 16px;
|
||
border: 1px solid var(--border-color);
|
||
}
|
||
|
||
.content-page pre code {
|
||
background-color: transparent;
|
||
padding: 0;
|
||
font-size: 100%;
|
||
color: inherit;
|
||
word-break: normal;
|
||
border-radius: 0;
|
||
}
|
||
|
||
.content-page hr {
|
||
height: 0.25em;
|
||
padding: 0;
|
||
margin: 24px 0;
|
||
background-color: var(--border-color);
|
||
border: 0;
|
||
}
|
||
|
||
/* Tables */
|
||
.content-page table {
|
||
border-spacing: 0;
|
||
border-collapse: collapse;
|
||
margin-top: 0;
|
||
margin-bottom: 16px;
|
||
display: block;
|
||
width: max-content;
|
||
max-width: 100%;
|
||
overflow: auto;
|
||
}
|
||
|
||
.content-page table th,
|
||
.content-page table td {
|
||
padding: 6px 13px;
|
||
border: 1px solid var(--border-color);
|
||
}
|
||
|
||
.content-page table th {
|
||
font-weight: 600;
|
||
background-color: rgba(var(--card-bg-rgb), 0.3);
|
||
}
|
||
|
||
.content-page table tr {
|
||
background-color: transparent;
|
||
border-top: 1px solid var(--border-color);
|
||
}
|
||
|
||
.content-page table tr:nth-child(2n) {
|
||
background-color: rgba(127, 127, 127, 0.04);
|
||
}
|
||
|
||
.content-page img {
|
||
max-width: 100%;
|
||
box-sizing: content-box;
|
||
background-color: transparent;
|
||
border-radius: var(--radius-sm);
|
||
}
|
||
|
||
.content-page a {
|
||
color: var(--accent-color);
|
||
text-decoration: none;
|
||
}
|
||
|
||
.content-page a:hover {
|
||
text-decoration: underline;
|
||
}
|
||
|
||
/* Task lists */
|
||
.content-page ul.contains-task-list {
|
||
list-style-type: none;
|
||
padding-left: 0;
|
||
}
|
||
|
||
.content-page .task-list-item input {
|
||
margin-right: 0.5em;
|
||
vertical-align: middle;
|
||
}
|
||
|
||
/* GitHub Calendar Fixes (HTML Table Version)
|
||
* 注:此处样式已合并到上方「projects:GitHub 热力图(github-calendar.js)」区域,避免重复维护。
|
||
*/
|