hexo-theme-keep/source/css/common/markdown.styl

239 lines
3.2 KiB
Stylus

.markdown-body {
font-size: 1rem;
blockquote {
p,
ul,
ol {
padding: 5px 5px 5px 10px;
}
box-sizing: border-box;
border-left: 5px solid var(--default-text-color);
margin: 20px 0;
color: var(--default-text-color);
background: var(--second-background-color);
}
p {
line-height: 2;
color: var(--default-text-color);
}
a {
position: relative;
outline: 0;
text-decoration: none;
overflow-wrap: break-word;
cursor: pointer;
border-bottom: 1px solid var(--third-text-color);
box-sizing: border-box;
padding-bottom: 2px;
.fas, .far, fab {
margin: 0 2px 0 6px;
position: relative;
color: var(--third-text-color);
font-size: 0.88rem;
}
&:hover {
text-decoration: underline;
&::after {
background: var(--primary-color);
}
}
}
strong {
color: var(--default-text-color);
}
em {
color: var(--default-text-color);
}
ul > li,
ol > li {
margin-left: 16px;
line-height: 2rem;
}
ul {
li {
list-style: disc;
ul {
li {
list-style: circle;
ul {
li {
list-style: square;
}
}
}
}
}
}
ol {
li {
list-style: decimal;
ol {
li {
list-style: upper-alpha;
ol {
li {
list-style: upper-roman;
}
}
}
}
}
}
li {
color: var(--default-text-color);
}
h1, h2, h3, h4, h5, h6 {
color: var(--second-text-color);
line-height: 1.5;
+keep-tablet() {
line-height: 1.25;
}
}
h1 {
font-size: 1.8rem;
font-weight: 600;
+keep-tablet() {
font-size: 1.7rem;
}
}
h2 {
font-size: 1.7rem;
font-weight: 600;
+keep-tablet() {
font-size: 1.6rem;
}
}
h3 {
font-size: 1.6rem;
font-weight: 550;
+keep-tablet() {
font-size: 1.5rem;
}
}
h4 {
font-size: 1.5rem;
font-weight: 550;
+keep-tablet() {
font-size: 1.4rem;
}
}
h5 {
font-size: 1.28rem;
font-weight: 500;
+keep-tablet() {
font-size: 1.18rem;
}
}
h6 {
font-size: 1.2rem;
font-weight: 500;
line-height: 1.2;
+keep-tablet() {
font-size: 1.1rem;
line-height: 1.1;
}
}
img {
box-sizing: border-box;
max-width: 100%;
cursor: zoom-in;
display: block;
box-shadow: 0 0 2px var(--shadow-color);
transition-t("padding, margin", "0, 0", "0.2, 0.2", "linear, linear");
if (hexo-config('style.article_img_align') == 'center') {
margin: 10px auto 2px;
} else {
margin: 10px 0 2px;
}
}
& > table {
border-spacing: 0;
border-collapse: collapse;
width: 100%;
overflow: auto;
td,
th {
padding: 0;
}
th {
font-weight: 600;
}
td,
th {
padding: 6px 13px;
border: 1px solid var(--border-color);
}
tr {
background-color: var(--background-color);
border: 1px solid var(--fourth-text-color);
}
tr:nth-child(2n) {
background-color: var(--second-background-color);
}
}
}