vuepress-theme-reco/styles/theme.styl

215 lines
3.9 KiB
Stylus
Raw Normal View History

@require './mode'
2019-04-15 10:35:40 +08:00
@require './code'
@require './custom-blocks'
@require './arrow'
@require './wrapper'
@require './toc'
2019-08-04 00:32:06 +08:00
@require './iconfont.css'
2019-04-15 10:35:40 +08:00
html, body
padding 0
margin 0
body
2019-08-04 00:32:06 +08:00
font-family Ubuntu, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif
2019-04-15 10:35:40 +08:00
-webkit-font-smoothing antialiased
-moz-osx-font-smoothing grayscale
font-size 16px
color var(--text-color)
background-color var(--background-color)
2019-04-15 10:35:40 +08:00
.page, .password-wrapper-in
overflow-x: hidden
margin-left $sidebarWidth
2019-04-15 10:35:40 +08:00
.navbar
position fixed
z-index 20
top 0
left 0
right 0
height $navbarHeight
box-sizing border-box
.sidebar-mask
position fixed
z-index 9
top 0
left 0
width 100vw
height 100vh
display none
background-color: rgba(0,0,0,.65);
.sidebar
font-size 16px
2019-11-27 20:12:51 +08:00
background-color var(--background-color)
2019-04-15 10:35:40 +08:00
width $sidebarWidth
position fixed
z-index 10
margin 0
top $navbarHeight
left 0
bottom 0
box-sizing border-box
border-right 1px solid var(--border-color)
2019-04-15 10:35:40 +08:00
overflow-y auto
.content__default:not(.custom)
2019-04-15 10:35:40 +08:00
@extend $wrapper
// > *:first-child
// margin-top 1.6rem
a:hover
text-decoration underline
p.demo
padding 1rem 1.5rem
border 1px solid #ddd
border-radius 4px
img
max-width 100%
.content__default.custom
2019-04-15 10:35:40 +08:00
padding 0
margin 0
img
max-width 100%
a
font-weight 500
color $accentColor
text-decoration none
p a code
font-weight 400
color $accentColor
kbd
background #eee
border solid 0.15rem #ddd
border-bottom solid 0.25rem #ddd
border-radius 0.15rem
padding 0 0.15em
blockquote
font-size .9rem
color #999
border-left .25rem solid #999
2019-12-20 18:18:14 +08:00
background-color var(--code-color)
2019-04-15 10:35:40 +08:00
margin 0.5rem 0
padding .25rem 0 .25rem 1rem
& > p
margin 0
ul, ol
padding-left 1.2em
strong
font-weight 600
h1, h2, h3, h4, h5, h6
font-weight 500
line-height 1.25
.content__default:not(.custom) > &
2019-04-15 10:35:40 +08:00
margin-top (0.5rem - $navbarHeight)
padding-top ($navbarHeight + 1rem)
margin-bottom 0
&:first-child
2019-10-16 20:21:47 +08:00
margin-top -3.5rem
2019-04-15 10:35:40 +08:00
margin-bottom 1rem
+ p, + pre, + .custom-block
margin-top 2rem
&:hover .header-anchor
opacity: 1
h1
2019-10-16 20:21:47 +08:00
font-size 1.95rem
2019-04-15 10:35:40 +08:00
h2
font-size 1.65rem
padding-bottom .3rem
border-bottom 1px solid var(--border-color)
2019-04-15 10:35:40 +08:00
h3
font-size 1.35rem
a.header-anchor
font-size 0.85em
float left
margin-left -0.87em
padding-right 0.23em
margin-top 0.125em
opacity 0
&:hover
text-decoration none
code, kbd, .line-number
font-family source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace
p, ul, ol
line-height 1.7
hr
border 0
border-top 1px solid var(--border-color)
2019-04-15 10:35:40 +08:00
table
border-collapse collapse
margin 1rem 0
display: block
overflow-x: auto
tr
2019-12-01 13:56:09 +08:00
border-top 1px solid var(--border-color)
2019-04-15 10:35:40 +08:00
&:nth-child(2n)
2019-12-01 13:56:09 +08:00
background-color var(--code-color)
2019-04-15 10:35:40 +08:00
th, td
2019-12-01 13:56:09 +08:00
border 1px solid var(--border-color)
2019-04-15 10:35:40 +08:00
padding .6em 1em
.theme-container
&.sidebar-open
.sidebar-mask
display: block
&.no-navbar
.content__default:not(.custom) > h1, h2, h3, h4, h5, h6
2019-04-15 10:35:40 +08:00
margin-top 1.5rem
padding-top 0
.sidebar
top 0
@media (min-width: ($MQMobile + 1px))
.theme-container.no-sidebar
.sidebar
display none
.page, .password-wrapper-in
margin-left 0
2019-04-15 10:35:40 +08:00
@require 'mobile.styl'
.iconfont
font-size: 0.9rem;
color: $textColorSub;
2019-04-15 10:35:40 +08:00
/************** **************/
::-webkit-scrollbar
width: 6px;
2019-04-15 10:35:40 +08:00
height: 5px;
::-webkit-scrollbar-track-piece
background-color: rgba(0, 0, 0, 0.2);
-webkit-border-radius: 6px;
::-webkit-scrollbar-thumb:vertical
height: 5px;
background-color: rgba(125, 125, 125, 0.7);
-webkit-border-radius: 6px;
::-webkit-scrollbar-thumb:horizontal
width: 5px;
background-color: rgba(125, 125, 125, 0.7);
2019-10-16 20:21:47 +08:00
-webkit-border-radius: 6px;
2019-04-15 10:35:40 +08:00
2019-05-06 11:42:02 +08:00
/************** **************/
.vuepress-flowchart
2019-10-16 20:21:47 +08:00
overflow: auto