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

141 lines
2.8 KiB
Stylus
Raw Normal View History

2024-01-30 23:48:00 +08:00
//
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
2021-02-19 23:33:19 +08:00
color: var(--text-p1)
2024-01-30 23:48:00 +08:00
line-height: 1.6
2021-07-09 22:41:09 +08:00
word-break: break-word
2021-02-19 23:33:19 +08:00
2024-01-30 23:48:00 +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
2024-01-30 23:48:00 +08:00
//
2022-11-23 22:44:11 +08:00
.md-text.content
2021-02-25 20:49:43 +08:00
position: relative
2024-01-30 23:48:00 +08:00
padding-top: 0
2022-12-12 20:39:07 +08:00
padding-bottom: 2rem
2022-12-11 19:44:51 +08:00
overflow: hidden
2021-07-26 22:26:46 +08:00
2024-01-18 22:11:58 +08:00
.l_body[text-indent] .md-text.content
2024-02-07 17:39:21 +08:00
//
p:not([class])
2024-01-31 22:45:07 +08:00
text-indent: 'calc(%s * 2)' % var(--fsp)
2024-02-02 00:36:01 +08:00
text-align: justify
2024-02-07 17:39:21 +08:00
a
text-indent: 0
2024-02-07 16:21:19 +08:00
ol,ul
margin-left: 0.5em
2024-01-18 22:11:58 +08:00
h1,h2,h3,h4,h5,h6
text-align: center
2024-01-30 23:48:00 +08:00
a.headerlink
display: none
2024-02-02 00:36:01 +08:00
h2
margin: 2em 0 1.5em
2024-02-07 17:39:21 +08:00
//
2024-02-07 20:16:47 +08:00
blockquote, .poetry, .okr, .timeline, li, .article-footer
2024-02-07 17:39:21 +08:00
p:not([class])
text-indent: 0
text-align: convert(hexo-config('style.text-align'))
2024-01-18 22:11:58 +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
2024-02-02 00:36:01 +08:00
--fsp: $fsp1
2024-01-31 22:45:07 +08:00
font-size: var(--fsp)
2021-07-15 00:19:06 +08:00
line-height: 1.5
2022-12-15 22:09:01 +08:00
code
font-size: inherit
padding: 0
2022-12-16 14:53:08 +08:00
background: none
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
2021-03-05 21:37:28 +08:00
// titles
2022-11-23 22:44:11 +08:00
.md-text.content
2024-01-30 23:48:00 +08:00
h1,h2,h3,h4,h5,h6
2024-01-31 22:45:07 +08:00
color: var(--text)
2024-01-30 23:48:00 +08:00
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
2021-02-19 23:33:19 +08:00
a.headerlink:before
2024-01-30 23:48:00 +08:00
content: ''
color: white
font-weight: 700
padding: 0 2px
2024-01-31 22:45:07 +08:00
font-size: $fs-12
2021-02-19 23:33:19 +08:00
h2
2024-02-02 00:36:01 +08:00
font-weight: 500
2024-01-31 22:45:07 +08:00
a.headerlink:before
content: ':'
2024-02-02 00:36:01 +08:00
2024-01-30 23:48:00 +08:00
.md-text.content:first-child .tag-plugin:first-child
margin-top: 0
2021-02-19 23:33:19 +08:00
2022-11-23 22:44:11 +08:00
.md-text p
2024-01-31 22:45:07 +08:00
font-size: var(--fsp)
2021-03-05 21:37:28 +08:00
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
2024-02-09 00:47:03 +08:00
li:not([class]) a:not([class])
p:not([class]) a:not([class])
table a:not([class])
2024-02-03 17:10:29 +08:00
position: relative
text-decoration: none
trans1 all
padding: 0 2px
border-radius: 0
2024-02-07 16:21:19 +08:00
color: inherit
2024-02-03 17:10:29 +08:00
background: linear-gradient(0deg,var(--theme-link),var(--theme-link)) no-repeat left 100%/100% 1px
&:hover
2024-02-07 16:21:19 +08:00
text-decoration: none
2024-02-03 17:10:29 +08:00
color: var(--theme-link)
border-radius: 4px
background: linear-gradient(0deg,var(--theme-link-opa),var(--theme-link-opa)) no-repeat left 100%/100% 100%
&:has(img)
background: none
padding: 0
&:hover
background: none