Add markdown styles

This commit is contained in:
Defectink
2022-04-06 16:02:27 +08:00
parent 5cec1c504f
commit 112309940c
6 changed files with 91 additions and 46 deletions

View File

@ -28,8 +28,8 @@
* --syntax-cursor-line: hsla(220, 100%, 80%, 0.04);
*/
.dark code[class*='language-'],
.dark pre[class*='language-'] {
.dark code,
.dark pre {
background: hsl(220, 13%, 18%);
color: hsl(220, 14%, 71%);
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
@ -51,24 +51,24 @@
}
/* Selection */
.dark code[class*='language-']::-moz-selection,
.dark code[class*='language-'] *::-moz-selection,
.dark pre[class*='language-'] *::-moz-selection {
.dark code::-moz-selection,
.dark code *::-moz-selection,
.dark pre *::-moz-selection {
background: hsl(220, 13%, 28%);
color: inherit;
text-shadow: none;
}
.dark code[class*='language-']::selection,
.dark code[class*='language-'] *::selection,
.dark pre[class*='language-'] *::selection {
.dark code::selection,
.dark code *::selection,
.dark pre *::selection {
background: hsl(220, 13%, 28%);
color: inherit;
text-shadow: none;
}
/* Code blocks */
.dark pre[class*='language-'] {
.dark pre {
padding: 1em;
margin: 0.5em 0;
overflow: auto;
@ -76,7 +76,7 @@
}
/* Inline code */
.dark :not(pre) > code[class*='language-'] {
.dark :not(pre) > code {
padding: 0.2em 0.3em;
border-radius: 0.3em;
white-space: normal;
@ -84,8 +84,8 @@
/* Print */
@media print {
.dark code[class*='language-'],
.dark pre[class*='language-'] {
.dark code,
.dark pre {
text-shadow: none;
}
}

View File

@ -28,8 +28,8 @@
* --syntax-cursor-line: hsla(230, 8%, 24%, 0.05);
*/
code[class*='language-'],
pre[class*='language-'] {
code,
pre {
background: hsl(230, 1%, 98%);
color: hsl(230, 8%, 24%);
font-family: 'Fira Code', 'Fira Mono', Menlo, Consolas, 'DejaVu Sans Mono',
@ -50,22 +50,22 @@ pre[class*='language-'] {
}
/* Selection */
code[class*='language-']::-moz-selection,
code[class*='language-'] *::-moz-selection,
pre[class*='language-'] *::-moz-selection {
code::-moz-selection,
code *::-moz-selection,
pre *::-moz-selection {
background: hsl(230, 1%, 90%);
color: inherit;
}
code[class*='language-']::selection,
code[class*='language-'] *::selection,
pre[class*='language-'] *::selection {
code::selection,
code *::selection,
pre *::selection {
background: hsl(230, 1%, 90%);
color: inherit;
}
/* Code blocks */
pre[class*='language-'] {
pre {
padding: 1em;
margin: 0.5em 0;
overflow: auto;
@ -73,7 +73,7 @@ pre[class*='language-'] {
}
/* Inline code */
:not(pre) > code[class*='language-'] {
:not(pre) > code {
padding: 0.2em 0.3em;
border-radius: 0.3em;
white-space: normal;

View File

@ -91,6 +91,13 @@
@apply text-lg leading-10;
}
#article .toc {
padding-left: 0.8em;
}
#article .toc li {
list-style-type: none;
}
#article h1 {
font-weight: bold;
text-align: center;
@ -272,3 +279,46 @@ h6:hover::before {
#article sup {
top: -0.5em;
}
#article ol li {
list-style-type: auto;
}
#article ul li {
list-style-type: initial;
}
#article ul.no-list,
#article ol.no-list {
padding: 0;
list-style-type: none;
}
#article ol[type='1'] {
list-style-type: decimal;
}
#article ol[type='a'] {
list-style-type: lower-alpha;
}
#article ol[type='i'] {
list-style-type: lower-roman;
}
#article div > ol:not([type]) {
list-style-type: decimal;
}
#article ul,
#article ol {
margin-top: 0;
margin-bottom: 0;
padding-left: 2em;
}
#article ol ol,
#article ul ol {
list-style-type: lower-roman;
}
#article ul ul ol,
#article ul ol ol,
#article ol ul ol,
#article ol ol ol {
list-style-type: lower-alpha;
}
#article dd {
margin-left: 0;
}