style: modify theme style.

This commit is contained in:
jaywcjlove
2022-09-03 13:33:25 +08:00
parent f245c33973
commit 3bf313ffc3
7 changed files with 54 additions and 50 deletions

View File

@@ -51,6 +51,7 @@ const Section = styled.section`
font-size: 1.05rem; font-size: 1.05rem;
display: block; display: block;
line-height: 12px; line-height: 12px;
margin-left: 0.6rem;
} }
a svg { a svg {
display: block; display: block;

View File

@@ -15,5 +15,5 @@ const Warpper = styled.div`
export const Preview = (props: MarkdownPreviewProps) => { export const Preview = (props: MarkdownPreviewProps) => {
const { css } = useContext(Context); const { css } = useContext(Context);
const html = markdownToHTML(props.source || '', css); const html = markdownToHTML(props.source || '', css);
return <Warpper contentEditable dangerouslySetInnerHTML={{ __html: html }} />; return <Warpper contentEditable spellCheck={false} dangerouslySetInnerHTML={{ __html: html }} />;
}; };

View File

@@ -15,5 +15,5 @@ const Warpper = styled.div`
export const Preview = (props: MarkdownPreviewProps) => { export const Preview = (props: MarkdownPreviewProps) => {
const { css, markdown } = useContext(Context); const { css, markdown } = useContext(Context);
const html = markdownToHTML(markdown, css); const html = markdownToHTML(markdown, css);
return <Warpper contentEditable dangerouslySetInnerHTML={{ __html: html }} />; return <Warpper contentEditable spellCheck={false} dangerouslySetInnerHTML={{ __html: html }} />;
}; };

View File

@@ -6,16 +6,28 @@ a {
h1 { h1 {
color: inherit; color: inherit;
font-size: 1.5rem; font-size: 1.5rem;
font-weight: bold;
} }
h2 { h2 {
color: inherit; color: inherit;
margin: 2.5rem 0 1rem 0; margin: 2.5rem 0 1rem 0;
font-size: 1.3em;
font-weight: bold;
} }
h3 { h3 {
color: inherit; color: inherit;
margin: 2rem 0 1rem 0; margin: 1em 0 1em 0;
font-weight: bold;
font-size: 1em;
}
h4 {
color: inherit;
margin: 0.6em 0 0.6em 0;
font-weight: bold;
font-size: 0.9em;
} }
p { p {

View File

@@ -1,7 +1,7 @@
a { a {
color: #576b95; color: #576b95;
text-decoration: none; text-decoration: none;
font-size: 14px; font-size: 0.85em;
} }
h1 { h1 {
@@ -11,7 +11,7 @@ h1 {
line-height: 1.75; line-height: 1.75;
font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;
font-size: 1.2em; font-size: 1em;
font-weight: bold; font-weight: bold;
margin: 2em auto 1em; margin: 2em auto 1em;
padding: 0 1em; padding: 0 1em;
@@ -26,16 +26,16 @@ h2 {
line-height: 1.75; line-height: 1.75;
font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;
font-size: 1.2em; font-size: 1.3em;
font-weight: bold; font-weight: bold;
margin: 4em auto 2em; margin: 4em auto 2em;
padding: 0 0.3em; padding: 0 0.3em;
border-radius: 0.3rem; border-radius: 0.3em;
background: #009874; background: #009874;
} }
p { p {
font-size: 14px; font-size: 0.85em;
} }
h3 { h3 {
@@ -53,19 +53,17 @@ h3 {
ul { ul {
padding-left: 1.2em; padding-left: 1.2em;
font-size: 14px;
} }
ol { ol {
padding-left: 1.2em; padding-left: 1.2em;
font-size: 14px;
} }
li { li {
margin: 0; margin: 0;
line-height: 26px; line-height: 1.5em;
color: rgb(30 41 59); color: rgb(30 41 59);
font-size: 14px; font-size: 0.85em;
} }
blockquote { blockquote {
@@ -73,7 +71,7 @@ blockquote {
line-height: 1.75; line-height: 1.75;
font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;
font-size: 14px; font-size: 0.85em;
font-style: normal; font-style: normal;
border-left: none; border-left: none;
padding: 0.1rem 1rem; padding: 0.1rem 1rem;
@@ -88,7 +86,6 @@ pre {
padding: 1em; padding: 1em;
color: rgb(51, 51, 51); color: rgb(51, 51, 51);
background: rgb(248, 248, 248); background: rgb(248, 248, 248);
font-size: 14px;
font-style: normal; font-style: normal;
font-variant-ligatures: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-variant-caps: normal;
@@ -114,7 +111,7 @@ table {
width: 100% !important; width: 100% !important;
border-collapse: collapse; border-collapse: collapse;
line-height: 1.35; line-height: 1.35;
font-size: 90%; font-size: 0.85em;
} }
td { td {
@@ -132,7 +129,7 @@ th {
text-align: left; text-align: left;
line-height: 1.75; line-height: 1.75;
font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace; font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace;
font-size: 14px; font-size: 0.85em;
margin: 0px; margin: 0px;
white-space: nowrap; white-space: nowrap;
} }
@@ -148,20 +145,20 @@ th {
white-space: pre; white-space: pre;
color: #009874; color: #009874;
background: rgba(27, 31, 35, 0.05); background: rgba(27, 31, 35, 0.05);
padding: 0.2rem 0.3rem; padding: 0.2em 0.3em;
border-radius: 4px; border-radius: 4px;
font-weight: bold; font-weight: bold;
font-size: 14px; font-size: 0.85em;
} }
.footnotes-title { .footnotes-title {
display: table; display: table;
font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;
font-size: 1rem; font-size: 1em;
font-weight: bold; font-weight: bold;
margin: 3rem 0 0.6rem 0; margin: 3em 0 0.6em 0;
padding-left: 0.2rem; padding-left: 0.2em;
} }
.footnotes-list { .footnotes-list {

View File

@@ -1,7 +1,7 @@
a { a {
color: #576b95; color: #576b95;
text-decoration: none; text-decoration: none;
font-size: 14px; font-size: 0.85em;
} }
h1 { h1 {
@@ -35,7 +35,7 @@ h2 {
} }
p { p {
font-size: 14px; font-size: 0.85em;
} }
h3 { h3 {
@@ -53,19 +53,17 @@ h3 {
ul { ul {
padding-left: 1.2em; padding-left: 1.2em;
font-size: 14px;
} }
ol { ol {
padding-left: 1.2em; padding-left: 1.2em;
font-size: 14px;
} }
li { li {
margin: 0; margin: 0;
line-height: 26px; line-height: 1.5em;
color: rgb(30 41 59); color: rgb(30 41 59);
font-size: 14px; font-size: 0.85em;
} }
blockquote { blockquote {
@@ -73,7 +71,7 @@ blockquote {
line-height: 1.75; line-height: 1.75;
font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;
font-size: 14px; font-size: 0.85em;
font-style: normal; font-style: normal;
border-left: none; border-left: none;
padding: 0.1rem 1rem; padding: 0.1rem 1rem;
@@ -88,7 +86,6 @@ pre {
padding: 1em; padding: 1em;
color: rgb(51, 51, 51); color: rgb(51, 51, 51);
background: rgb(248, 248, 248); background: rgb(248, 248, 248);
font-size: 14px;
font-style: normal; font-style: normal;
font-variant-ligatures: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-variant-caps: normal;
@@ -114,7 +111,7 @@ table {
width: 100% !important; width: 100% !important;
border-collapse: collapse; border-collapse: collapse;
line-height: 1.35; line-height: 1.35;
font-size: 90%; font-size: 0.85em;
} }
td { td {
@@ -132,7 +129,7 @@ th {
text-align: left; text-align: left;
line-height: 1.75; line-height: 1.75;
font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace; font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace;
font-size: 14px; font-size: 0.85em;
margin: 0px; margin: 0px;
white-space: nowrap; white-space: nowrap;
} }
@@ -151,17 +148,17 @@ th {
padding: 0.2rem 0.3rem; padding: 0.2rem 0.3rem;
border-radius: 4px; border-radius: 4px;
font-weight: bold; font-weight: bold;
font-size: 14px; font-size: 0.85em;
} }
.footnotes-title { .footnotes-title {
display: table; display: table;
font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;
font-size: 1rem; font-size: 1em;
font-weight: bold; font-weight: bold;
margin: 3rem 0 0.6rem 0; margin: 3em 0 0.6em 0;
padding-left: 0.2rem; padding-left: 0.2em;
} }
.footnotes-list { .footnotes-list {

View File

@@ -1,7 +1,7 @@
a { a {
color: #576b95; color: #576b95;
text-decoration: none; text-decoration: none;
font-size: 14px; font-size: 0.85em;
} }
h1 { h1 {
@@ -32,7 +32,7 @@ h2 {
} }
p { p {
font-size: 14px; font-size: 0.85em;
} }
h3 { h3 {
@@ -50,19 +50,17 @@ h3 {
ul { ul {
padding-left: 1.2em; padding-left: 1.2em;
font-size: 14px;
} }
ol { ol {
padding-left: 1.2em; padding-left: 1.2em;
font-size: 14px;
} }
li { li {
margin: 0; margin: 0;
line-height: 26px; line-height: 1.5em;
color: rgb(30 41 59); color: rgb(30 41 59);
font-size: 14px; font-size: 0.85em;
} }
blockquote { blockquote {
@@ -70,7 +68,7 @@ blockquote {
line-height: 1.75; line-height: 1.75;
font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;
font-size: 14px; font-size: 0.85em;
font-style: normal; font-style: normal;
border-left: none; border-left: none;
padding: 0.1rem 1rem; padding: 0.1rem 1rem;
@@ -85,7 +83,6 @@ pre {
padding: 1em; padding: 1em;
color: rgb(51, 51, 51); color: rgb(51, 51, 51);
background: rgb(248, 248, 248); background: rgb(248, 248, 248);
font-size: 14px;
font-style: normal; font-style: normal;
font-variant-ligatures: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-variant-caps: normal;
@@ -111,7 +108,7 @@ table {
width: 100% !important; width: 100% !important;
border-collapse: collapse; border-collapse: collapse;
line-height: 1.35; line-height: 1.35;
font-size: 90%; font-size: 0.85em;
} }
td { td {
@@ -129,7 +126,7 @@ th {
text-align: left; text-align: left;
line-height: 1.75; line-height: 1.75;
font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace; font-family: Menlo, 'Operator Mono', Consolas, Monaco, monospace;
font-size: 14px; font-size: 0.85em;
margin: 0px; margin: 0px;
white-space: nowrap; white-space: nowrap;
} }
@@ -145,20 +142,20 @@ th {
white-space: pre; white-space: pre;
color: #ffb11b; color: #ffb11b;
background: rgba(27, 31, 35, 0.05); background: rgba(27, 31, 35, 0.05);
padding: 0.2rem 0.3rem; padding: 0.2em 0.3em;
border-radius: 4px; border-radius: 4px;
font-weight: bold; font-weight: bold;
font-size: 14px; font-size: 0.85em;
} }
.footnotes-title { .footnotes-title {
display: table; display: table;
font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;
font-size: 1rem; font-size: 1em;
font-weight: bold; font-weight: bold;
margin: 3rem 0 0.6rem 0; margin: 3em 0 0.6em 0;
padding-left: 0.2rem; padding-left: 0.2em;
} }
.footnotes-list { .footnotes-list {