hexo-theme-stellar/source/css/_layout/md.styl

112 lines
1.9 KiB
Stylus
Raw Normal View History

2021-02-19 23:33:19 +08:00
article.md
max-width: 100%
padding: 1rem
color: var(--text-p1)
line-height: 1.7
2021-07-09 22:41:09 +08:00
word-break: break-word
2021-02-19 23:33:19 +08:00
2021-03-05 21:37:28 +08:00
article.md.excerpt
p
font-size: $fs-14
margin: 1em 0
2021-02-19 23:33:19 +08:00
article.md.content
2021-02-25 20:49:43 +08:00
position: relative
2021-03-05 21:37:28 +08:00
margin-bottom: 2rem
2021-03-13 22:30:07 +08:00
>:first-child
margin-top: 0
2021-02-19 23:33:19 +08:00
h1.article-title
2021-03-05 21:37:28 +08:00
margin-top: 0.5rem
2021-02-19 23:33:19 +08:00
line-height: 1.2
color: var(--text-p0)
2021-04-02 20:24:16 +08:00
h2:first-child
margin-top: 0
2021-03-05 21:37:28 +08:00
h2,h3,h4,h5,h6
color: var(--text-p0)
2021-03-08 00:20:51 +08:00
padding-top: 1rem
2021-03-05 21:37:28 +08:00
margin-bottom: 1em
2021-07-15 00:19:06 +08:00
line-height: 1.8
2021-02-19 23:33:19 +08:00
&:hover
a.headerlink:before
opacity: 1
2021-07-26 22:26:46 +08:00
.md
2021-07-29 00:25:37 +08:00
ul:not(:last-child),
ol:not(:last-child)
2021-07-26 22:26:46 +08:00
padding-bottom: .5rem
margin: 0
2021-07-15 00:19:06 +08:00
blockquote,ul,ol
p,ul,ol
font-size: $fs-14
line-height: 1.5
p,blockquote,.tag-plugin,ul,ol,.highlight,table
*
--gap-p: .5rem
2021-07-26 22:26:46 +08:00
p,.tag-plugin
margin-top: var(--gap-p)
margin-bottom: var(--gap-p)
.highlight,table
--gap-p: 1rem
2021-03-05 21:37:28 +08:00
// titles
2021-07-10 11:12:35 +08:00
article.md.content
2021-02-19 23:33:19 +08:00
a.headerlink:before
opacity: 0
content: '#'
position: absolute
margin-left: -0.75em
h2
margin-top: 3rem
border-bottom: 1px solid var(--block-border)
font-weight: 400
h3
2021-03-08 17:54:23 +08:00
margin-top: 1.5rem
2021-03-05 21:37:28 +08:00
font-weight: 400
h4,h5,h6
2021-02-19 23:33:19 +08:00
font-weight: 500
2021-03-08 00:20:51 +08:00
h1+h2
2021-07-10 11:12:35 +08:00
margin-top: -0.5rem
2021-02-19 23:33:19 +08:00
h2+h3
2021-07-10 11:12:35 +08:00
margin-top: -1rem
2021-02-19 23:33:19 +08:00
h3+h4
2021-07-10 11:12:35 +08:00
margin-top: -1rem
2021-03-05 21:37:28 +08:00
h4+h5
2021-07-10 11:12:35 +08:00
margin-top: -1rem
2021-03-05 21:37:28 +08:00
h5+h6
2021-07-10 11:12:35 +08:00
margin-top: -1rem
2021-02-19 23:33:19 +08:00
// a
article.md
2021-08-28 13:08:32 +08:00
p, li:not([class])
>a:not([class])
2021-02-19 23:33:19 +08:00
font-weight: 500
&:hover
text-decoration: underline
2021-02-28 18:19:32 +08:00
article.md p
2021-03-05 21:37:28 +08:00
font-size: $fs-p
article.md pre
-webkit-font-smoothing: auto
-moz-osx-font-smoothing: auto
2021-02-19 23:33:19 +08:00
// div
article.md>div
2021-07-15 00:19:06 +08:00
margin: var(--gap-p) 0
2021-02-19 23:33:19 +08:00
// blockquote
article.md blockquote
2021-07-15 00:19:06 +08:00
margin-left: 0
margin-right: 0
2021-02-19 23:33:19 +08:00
padding: 1rem
2021-07-03 23:43:52 +08:00
background: var(--card)
2021-07-26 22:26:46 +08:00
border-left: 6px solid $color-theme
2021-07-03 23:43:52 +08:00
border-radius: $border-block
2021-02-19 23:33:19 +08:00
color: var(--text-p2)
2021-07-03 23:43:52 +08:00
box-shadow: $boxshadow-card
2021-02-19 23:33:19 +08:00
article.md img
2021-08-02 22:48:25 +08:00
border-radius: $border-image
2021-02-19 23:33:19 +08:00
margin: auto
display: block