docs_vue2/assets/styles/post.styl

416 lines
5.6 KiB
Stylus
Raw Permalink Normal View History

@import "~highlight.js/styles/night-owl.css"
2020-08-13 11:47:56 +08:00
margin-y($top, $bottom = $top)
margin-top $top
margin-bottom $bottom
.post
2021-10-28 17:03:43 +08:00
position relative
2020-08-13 11:47:56 +08:00
padding 30px 60px
font-size 14px
line-height 1.8
color #282c33
2020-08-13 11:47:56 +08:00
font-weight 400
hyphens auto
.post-layout &
min-height 100%
margin-bottom -192px
&::after
content ""
display block
height 192px
.post-layout.no-links &
margin-bottom -58px
.no-links &::after
height 58px
2021-09-25 15:17:57 +08:00
.one-demo
margin 1em 0 1.25em
.one-details
margin-bottom 5px
2022-05-26 19:16:47 +08:00
.icon-link
position absolute
transition-property transform, opacity
transition-duration 0.2s
transform translate(calc(-1px - 100%), -50%)
opacity 0
padding 0.1em
[data-target]
.icon-link
opacity 1
transform translate(-100%, -50%)
[data-md]
2020-08-13 11:47:56 +08:00
h1
2021-09-25 15:17:57 +08:00
h1&
2020-08-13 11:47:56 +08:00
margin-y(0, 1.25em)
font-size 36px
small
vertical-align 0.1em
color #999
h2
2021-09-25 15:17:57 +08:00
h2&
2020-08-13 11:47:56 +08:00
margin-y(1.3em, 1.2em)
font-size 30px
& + h3
margin-top 2em
h3
2021-09-25 15:17:57 +08:00
h3&
2020-08-13 11:47:56 +08:00
margin-y(1.25em, 1.15em)
font-size 24px
h4
2021-09-25 15:17:57 +08:00
h4&
margin-y(1.4em, 1.2em)
2020-08-13 11:47:56 +08:00
font-size 18px
h5
2021-09-25 15:17:57 +08:00
h5&
margin-y(1.5em)
2020-08-13 11:47:56 +08:00
font-size 14px
h6
2021-09-25 15:17:57 +08:00
h6&
margin-y(1.3em)
2020-08-13 11:47:56 +08:00
font-size 12px
h1
2021-09-25 15:17:57 +08:00
h1&
2020-08-13 11:47:56 +08:00
h2
2021-09-25 15:17:57 +08:00
h2&
2020-08-13 11:47:56 +08:00
h3
2021-09-25 15:17:57 +08:00
h3&
2020-08-13 11:47:56 +08:00
font-weight 500
clear both
h1
2021-09-25 15:17:57 +08:00
h1&
2020-08-13 11:47:56 +08:00
h2
2021-09-25 15:17:57 +08:00
h2&
2020-08-13 11:47:56 +08:00
h3
2021-09-25 15:17:57 +08:00
h3&
2020-08-13 11:47:56 +08:00
h4
2021-09-25 15:17:57 +08:00
h4&
2020-08-13 11:47:56 +08:00
h5
2021-09-25 15:17:57 +08:00
h5&
2020-08-13 11:47:56 +08:00
h6
2021-09-25 15:17:57 +08:00
h6&
2022-05-26 19:16:47 +08:00
position relative
display flex
align-items center
2020-08-13 11:47:56 +08:00
color #333
line-height 1
2022-05-26 19:16:47 +08:00
&:hover
.icon-link
opacity 1
transform translate(-100%, -50%)
2020-08-13 11:47:56 +08:00
br
2021-09-25 15:17:57 +08:00
br&
2020-08-13 11:47:56 +08:00
clear both
p
2021-09-25 15:17:57 +08:00
p&
2020-08-13 11:47:56 +08:00
margin-y(0.5em)
ul
2021-09-25 15:17:57 +08:00
ul&
2020-08-13 11:47:56 +08:00
ol
2021-09-25 15:17:57 +08:00
ol&
2020-08-13 11:47:56 +08:00
padding-left 1.5em
blockquote
2021-09-25 15:17:57 +08:00
blockquote&
2020-08-13 11:47:56 +08:00
margin 1em 0
padding-left 1em
border-left 5px solid #f1f1f1
2021-09-25 15:17:57 +08:00
color #666
transition color 0.2s, border-color 0.2s
&:hover
color #333
border-left-color #d3d3d3
2020-08-13 11:47:56 +08:00
table
2021-09-25 15:17:57 +08:00
table&
2020-08-13 11:47:56 +08:00
width 100%
border-collapse collapse
border 1px solid #f1f1f1
border-radius 4px
2020-08-13 11:47:56 +08:00
margin-y(1.5em)
thead
position sticky
top -1px
background #f3f6f988
backdrop-filter blur(4px)
th
position relative
&::after
content ""
position absolute
bottom 0
width 100%
height 1px
left 0
background #f1f1f1
// pre
// table
// max-width 480px
2020-08-13 11:47:56 +08:00
th
td
min-width 90px
padding 8px 14px
2020-08-13 11:47:56 +08:00
border 1px solid #f1f1f1
border-style solid none
text-align left
vertical-align top
2020-08-13 11:47:56 +08:00
& > :first-child
margin-top 0
2020-08-13 11:47:56 +08:00
& > :last-child
margin-bottom 0
2020-08-13 11:47:56 +08:00
pre
font-size 90%
2020-08-13 11:47:56 +08:00
table
margin-y(0.2em, 0.5em)
td:first-child
white-space nowrap
a:link
2021-09-25 15:17:57 +08:00
a&:link
2020-08-13 11:47:56 +08:00
a:visited
2021-09-25 15:17:57 +08:00
a&:visited
text-decoration none
color #0052cc
transition color 0.2s
2020-08-13 11:47:56 +08:00
2021-09-25 15:17:57 +08:00
&:hover
color #06f
2020-08-13 11:47:56 +08:00
2021-09-25 15:17:57 +08:00
&:active
color #0046ad
2020-08-13 11:47:56 +08:00
code
2021-09-25 15:17:57 +08:00
code&
2020-08-13 11:47:56 +08:00
font-size 90%
hyphens none
font-family Menlo, consolas, monospace
&:not(pre > code)
padding 2px 4px
background-color #0066ff16
overflow visible
border-radius 3px
2020-08-13 11:47:56 +08:00
hr
2021-09-25 15:17:57 +08:00
hr&
2020-08-13 11:47:56 +08:00
height 1px
margin 2em 0
padding 0
background-color #eff0f1
border 0
clear both
figure
2021-09-25 15:17:57 +08:00
figure&
2020-08-13 11:47:56 +08:00
float right
width 60%
margin 0 0 30px 20px
& + h1
& + h2
& + h3
& + h4
& + h5
& + h6
margin-top 0
img
display block
margin auto
.preview
padding 20px
overflow hidden
border 1px solid #e5e5e5
transition box-shadow 0.2s
cursor pointer
text-align center
&:hover
box-shadow 0 0 5px rgba(0, 0, 0, 0.2)
&.hero
width 100%
float none
figcaption
2021-09-25 15:17:57 +08:00
figcaption&
2020-08-13 11:47:56 +08:00
margin-top 10px
font-size 12px
p
margin 0
line-height 20px
.caption
font-weight 500
.desc
color #999
img
2021-09-25 15:17:57 +08:00
img&
2020-08-13 11:47:56 +08:00
max-width 100%
max-height 100%
pre
2021-09-25 15:17:57 +08:00
pre&
2021-07-19 17:29:41 +08:00
border-radius 4px
2020-08-13 11:47:56 +08:00
white-space pre
overflow auto
line-height 1.6
2020-08-13 11:47:56 +08:00
code
2021-09-25 15:17:57 +08:00
border none
padding 18px 24px
2020-08-13 11:47:56 +08:00
var
font-family "PT Serif", Georgia, serif
kbd
display inline-block
padding 3px 5px 6px
font-size 90%
line-height 10px
color #444d56
vertical-align 1px
background-color #fafbfc
border solid 1px #c6cbd1
border-bottom-color #959da5
border-radius 3px
box-shadow inset 0 -1px 0 #959da5
.custom-block
2021-09-25 15:17:57 +08:00
.custom-block&
2020-08-13 11:47:56 +08:00
border 1px solid
2021-07-19 20:12:14 +08:00
border-radius 4px
2020-08-13 11:47:56 +08:00
margin 1em 0
padding 0.75em 1em
& > :first-child
margin-top 0
& > :last-child
margin-bottom 0
.veui-alert
2021-09-25 15:17:57 +08:00
.veui-alert&
2021-08-30 15:51:56 +08:00
margin 1em 0
p:first-child
margin-top 0
2020-08-13 11:47:56 +08:00
p:last-child
margin-bottom 0
2020-08-13 11:47:56 +08:00
.badges
2021-09-25 23:43:28 +08:00
.badges&
2020-08-13 11:47:56 +08:00
border none
padding 0
code
padding 2px 3px
background #333
border-radius 3px
color #fff
font-size 80%
2021-09-25 23:43:28 +08:00
.oss-badges&
2020-08-13 11:47:56 +08:00
border none
padding 0
a
margin-right 10px
.hljs-attr
color #c5e478
[data-target]
animation target-blink 6s ease 1 both
2021-10-22 18:51:49 +08:00
.meta
display flex
justify-content center
.one-edit-link
margin-top 40px
@keyframes target-blink
0%
background-color #f2f7ff
2021-10-20 10:59:36 +08:00
3%
9%
background-color #fff
2021-10-20 10:59:36 +08:00
6%
12%
80%
background-color #f2f7ff
@media (max-width 480px)
.post
padding 30px
2022-05-26 19:16:47 +08:00
[data-md]
h1
h1&
font-size 24px
h2
h2&
font-size 20px
h3
h3&
font-size 18px
h4
h4&
font-size 16px
h5
h5&
font-size 14px
2021-10-25 20:18:47 +08:00
table
display block
max-width 100%
width fit-content
overflow-x auto
table
display table