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

132 lines
2.5 KiB
Stylus

//
.md-text
max-width: 100%
padding: 1rem
color: var(--text-p1)
line-height: 1.6
word-break: break-word
//
.md-text.excerpt
p
font-size: $fs-14
margin: 1em 0
//
.md-text.content
position: relative
padding-top: 0
padding-bottom: 2rem
overflow: hidden
.l_body[text-indent] .md-text.content
>p
text-indent: 'calc(%s * 2)' % var(--fsp)
text-align: convert(hexo-config('style.text-align'))
h1,h2,h3,h4,h5,h6
text-align: center
a.headerlink
display: none
>h2:not([class])
border-bottom: none
.md-text
ul:not(:last-child),
ol:not(:last-child)
padding-bottom: .5rem
margin: 0
blockquote,ul,ol
p,ul,ol
--fsp: var(--fsp1)
font-size: var(--fsp)
line-height: 1.5
code
font-size: inherit
padding: 0
background: none
p,blockquote,.tag-plugin,ul,ol,.highlight,table
*
--gap-p: var(--gap-p-compact)
p,ul,ol
margin-top: 'calc(%s - 4px)' % var(--gap-p)
margin-bottom: 'calc(%s - 4px)' % var(--gap-p)
.tag-plugin,iframe
margin-top: var(--gap-p)
margin-bottom: var(--gap-p)
iframe
display: block
// titles
.md-text.content
h1,h2,h3,h4,h5,h6
margin-bottom: var(--gap-p)
color: var(--text)
line-height: 1.8
blockquote, .tag-plugin
h2,h3,h4,h5,h6
margin-top: 0.25em
margin-bottom: 0.25em
a.headerlink
background: $color-theme
border-radius: 2px
margin-right: 8px
trans1 background
a.headerlink:hover
background: $color-hover
a.headerlink:before
content: ''
color: white
font-weight: 700
padding: 0 2px
font-size: $fs-12
h2
margin-top: 'calc(%s + 1rem)' % var(--gap-p)
font-weight: 400
a.headerlink:before
content: ':'
h3
margin-top: 'calc(%s + 0.75rem)' % var(--gap-p)
font-weight: 400
h4,h5,h6
margin-top: 'calc(%s + 0.5rem)' % var(--gap-p)
font-weight: 500
.md-text.content:first-child .tag-plugin:first-child
margin-top: 0
.md-text p
font-size: var(--fsp)
.md-text pre
-webkit-font-smoothing: auto
-moz-osx-font-smoothing: auto
.md-text
.center
align-self: center
// div
.md-text>div
margin: var(--gap-p) 0
.md-text img
border-radius: $border-image
margin: auto
display: block
.md-text
p:not([class]), li:not([class])
a:not([class])
padding: 0 2px
margin: 0 -2px
border-radius: 2px
trans1 all
text-decoration: underline
&:hover
color: $color-hover
&:has(img)
text-decoration: none
padding: 0