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

259 lines
3.2 KiB
Stylus

.markdown-body {
font-size 1rem
blockquote {
p
ul
ol {
padding 0.4rem 0.4rem 0.4rem 0.8rem
}
box-sizing border-box
margin 1.4rem 0
color var(--default-text-color)
background var(--second-background-color)
border-left 0.4rem solid var(--default-text-color)
}
p {
color var(--default-text-color)
line-height 2
}
a {
position relative
box-sizing border-box
padding-bottom 0.2rem
text-decoration none
overflow-wrap break-word
border-bottom 0.1rem solid var(--third-text-color)
outline 0
cursor pointer
.fas
.far
.fab {
position relative
margin 0 0.2rem 0 0.4rem
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
ol {
li {
margin-left 1rem
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-weight 600
font-size 1.8rem
+keep-tablet() {
font-size 1.7rem
}
}
h2 {
font-weight 600
font-size 1.7rem
+keep-tablet() {
font-size 1.6rem
}
}
h3 {
font-weight 550
font-size 1.6rem
+keep-tablet() {
font-size 1.5rem
}
}
h4 {
font-weight 550
font-size 1.5rem
+keep-tablet() {
font-size 1.4rem
}
}
h5 {
font-weight 500
font-size 1.28rem
+keep-tablet() {
font-size 1.18rem
}
}
h6 {
font-weight 500
font-size 1.2rem
line-height 1.2
+keep-tablet() {
font-size 1.1rem
line-height 1.1
}
}
img {
position relative
display block
box-sizing border-box
max-width 100%
box-shadow 0 0 0.2rem var(--shadow-color)
cursor zoom-in
opacity 1
&.hide {
opacity 0
}
if (hexo-config('post.img_align') == 'center' || hexo-config('style.article_img_align') == 'center') {
margin 0.8rem auto 0.2rem
}
else {
margin 0.8rem 0 0.2rem
}
}
& > table {
width 100%
overflow auto
border-collapse collapse
border-spacing 0
+keep-mobile() {
& {
table-layout fixed
}
}
td
th {
padding 0
}
th {
font-weight 600
}
td
th {
padding 0.4rem 1rem
border 0.1rem solid var(--border-color)
}
tr {
background-color var(--background-color)
border 0.1rem solid var(--fourth-text-color)
}
tr:nth-child(2n) {
background-color var(--second-background-color)
}
}
}