style(markdown): enhance typography and spacing for improved readability

- Increased line height and adjusted margins for headers and paragraphs to enhance text clarity.
- Added letter and word spacing for better text presentation.
- Updated blockquote and table styles for a more visually appealing layout.
- Improved hover effect for table rows to enhance user interaction.
This commit is contained in:
kangfenmao 2025-07-10 10:48:29 +08:00
parent d7002cda11
commit 1d289621fc

View File

@ -1,8 +1,10 @@
.markdown {
color: var(--color-text);
line-height: 1.6;
line-height: 2;
user-select: text;
word-break: break-word;
letter-spacing: 0.02em;
word-spacing: 0.05em;
h1:first-child,
h2:first-child,
@ -19,12 +21,14 @@
h4,
h5,
h6 {
margin: 1em 0 1em 0;
margin: 2em 0 1em 0;
line-height: 1.3;
font-weight: bold;
font-family: var(--font-family);
}
h1 {
margin-top: 0;
font-size: 2em;
border-bottom: 0.5px solid var(--color-border);
padding-bottom: 0.3em;
@ -53,9 +57,9 @@
}
p {
margin: 1em 0;
margin: 1.3em 0;
white-space: pre-wrap;
line-height: 2em;
text-align: justify;
&:last-child {
margin-bottom: 5px;
@ -150,16 +154,19 @@
}
blockquote {
margin: 1em 0;
padding-left: 1em;
color: var(--color-text-light);
border-left: 4px solid var(--color-border);
font-family: var(--font-family);
margin: 1.5em 0;
padding: 1em 1.5em;
background-color: var(--color-background-soft);
border-left: 4px solid var(--color-primary);
border-radius: 0 8px 8px 0;
font-style: italic;
position: relative;
}
table {
--table-border-radius: 8px;
margin: 1em 0;
margin: 2em 0;
font-size: 0.9em;
width: 100%;
border-radius: var(--table-border-radius);
overflow: hidden;
@ -184,8 +191,13 @@
th {
background-color: var(--color-background-mute);
font-weight: bold;
font-weight: 600;
font-family: var(--font-family);
text-align: left;
}
tr:hover {
background-color: var(--color-background-soft);
}
img {