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

158 lines
2.9 KiB
Stylus
Raw Normal View History

2022-11-23 22:44:11 +08:00
.md-text
2021-02-19 23:33:19 +08:00
max-width: 100%
2022-12-12 20:39:07 +08:00
padding: 1rem
2022-11-19 17:42:35 +08:00
&:first-child
margin-top: 0
2021-02-19 23:33:19 +08:00
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
2022-11-23 22:44:11 +08:00
.md-text.excerpt
2021-03-05 21:37:28 +08:00
p
font-size: $fs-14
margin: 1em 0
h1.article-title
margin-top: .5em
margin-bottom: 1em
line-height: 1.2
color: var(--text-p0)
2022-11-23 22:44:11 +08:00
.md-text.content
2021-02-25 20:49:43 +08:00
position: relative
2022-12-12 20:39:07 +08:00
padding-bottom: 2rem
2022-12-11 19:44:51 +08:00
overflow: hidden
2022-01-04 23:34:21 +08:00
&.indent
>p:not([class])
text-indent: 'calc(%s * 2)' % $fs-p
2022-10-25 10:07:53 +08:00
text-align: convert(hexo-config('style.text-align'))
2022-10-14 12:52:21 +08:00
a
text-indent: 0
2022-01-04 23:34:21 +08:00
h1,h2,h3,h4,h5,h6
text-align: center
2022-01-05 00:00:25 +08:00
>h2:not([class])
2022-12-15 00:45:48 +08:00
border-bottom: none
2022-11-19 17:42:35 +08:00
>:first-child:not(h1)
2022-10-11 22:38:33 +08:00
margin-top: 0
2021-11-20 13:18:52 +08:00
h1:not(:first-child)
margin-top: 2em
2022-12-15 00:45:48 +08:00
h2
margin-bottom: 1rem
h3,h4,h5,h6
margin-bottom: .5rem
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-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
2022-12-12 21:07:22 +08:00
.md-text.content:first-child
padding-top: 0
2022-01-04 23:34:21 +08:00
2022-11-23 22:44:11 +08:00
.md-text
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
2022-12-15 22:09:01 +08:00
code
font-size: inherit
padding: 0
2021-07-15 00:19:06 +08:00
p,blockquote,.tag-plugin,ul,ol,.highlight,table
*
2022-12-15 22:09:01 +08:00
--gap-p: var(--gap-p-compact)
2022-11-26 13:17:47 +08:00
p,ul,ol
2022-01-04 23:34:21 +08:00
margin-top: 'calc(%s - 4px)' % var(--gap-p)
margin-bottom: 'calc(%s - 4px)' % var(--gap-p)
2022-01-13 18:27:20 +08:00
.tag-plugin,iframe
2021-07-26 22:26:46 +08:00
margin-top: var(--gap-p)
margin-bottom: var(--gap-p)
2022-04-05 21:54:24 +08:00
iframe
display: block
2022-12-15 22:09:01 +08:00
ul>li, ol>li
margin-top: 4px
margin-bottom: 4px
2021-03-05 21:37:28 +08:00
// titles
2022-11-23 22:44:11 +08:00
.md-text.content
2021-02-19 23:33:19 +08:00
a.headerlink:before
opacity: 0
content: '#'
position: absolute
margin-left: -0.75em
h2
2022-01-04 23:34:21 +08:00
margin-top: 2rem
2021-02-19 23:33:19 +08:00
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
2022-06-10 23:29:21 +08:00
margin-top: -0.5rem
2021-02-19 23:33:19 +08:00
h3+h4
2022-06-10 23:29:21 +08:00
margin-top: -0.5rem
2021-03-05 21:37:28 +08:00
h4+h5
2022-06-10 23:29:21 +08:00
margin-top: -0.5rem
2021-03-05 21:37:28 +08:00
h5+h6
2022-06-10 23:29:21 +08:00
margin-top: -0.5rem
2021-02-19 23:33:19 +08:00
2022-11-23 22:44:11 +08:00
.md-text p
2021-03-05 21:37:28 +08:00
font-size: $fs-p
2022-11-23 22:44:11 +08:00
.md-text pre
-webkit-font-smoothing: auto
-moz-osx-font-smoothing: auto
2021-02-19 23:33:19 +08:00
2022-11-23 22:44:11 +08:00
.md-text
2022-01-13 18:27:20 +08:00
.center
align-self: center
2021-02-19 23:33:19 +08:00
// div
2022-11-23 22:44:11 +08:00
.md-text>div
2021-07-15 00:19:06 +08:00
margin: var(--gap-p) 0
2021-02-19 23:33:19 +08:00
2022-11-23 22:44:11 +08:00
.md-text 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
2022-10-08 16:48:13 +08:00
2022-11-23 22:44:11 +08:00
.md-text
2022-10-08 16:48:13 +08:00
p:not([class]), li:not([class])
a:not([class])
position: relative
2022-10-31 13:34:40 +08:00
padding: 2px 0
2022-10-08 16:48:13 +08:00
text-decoration: none
2022-10-14 12:52:21 +08:00
line-height: 1.2
2022-12-10 15:49:59 +08:00
&:before
2022-10-08 16:48:13 +08:00
content: ''
position: absolute
border-radius: 2px
2022-10-31 13:34:40 +08:00
bottom: 0
left: 0
right: 0
2022-10-08 16:48:13 +08:00
height: 1px
2022-10-31 13:34:40 +08:00
opacity: 0.8
2022-11-04 23:13:01 +08:00
background: var(--theme-link)
2022-10-08 16:48:13 +08:00
trans1: all
&:hover
border-bottom: none
2022-11-04 23:13:01 +08:00
color: var(--theme-link)
2022-12-10 15:49:59 +08:00
z-index 0
&:before
2022-10-08 16:48:13 +08:00
height: 100%
opacity: 0.2
2022-12-10 15:49:59 +08:00
z-index -1
2022-10-08 16:48:13 +08:00
bottom: 0
2022-10-31 13:34:40 +08:00
left: -2px
right: -2px