diff --git a/source/css/_common/highlight.styl b/source/css/_common/highlight.styl index 8b1d2c4..cc01255 100644 --- a/source/css/_common/highlight.styl +++ b/source/css/_common/highlight.styl @@ -33,7 +33,7 @@ article.md .highlight padding: 0 border: none line-height: 1.5 - margin: 0 + margin: 0 !important background: transparent border: none scrollbar-codeblock(convert(hexo-config('style.codeblock.scrollbar'))) diff --git a/source/css/_custom.styl b/source/css/_custom.styl index 24a8df3..9632560 100644 --- a/source/css/_custom.styl +++ b/source/css/_custom.styl @@ -65,6 +65,7 @@ $border-block = 4px --width-left: 256px --width-main: 680px --gap-l: 16px + --gap-p: 1.25rem // gap for paragraph // desktop or larger @media screen and (min-width: $device-desktop) --gap-l: 32px diff --git a/source/css/_defines/func.styl b/source/css/_defines/func.styl index 01184f3..b3d8d50 100644 --- a/source/css/_defines/func.styl +++ b/source/css/_defines/func.styl @@ -97,11 +97,3 @@ hover-block($v, $h, $br = 4px) trans2 color background &:hover background: var(--block-hover) - - -inside-box($fs = $fs-15) - p,ol,ul - margin-top: 0.5rem - margin-bottom: 0.5rem - p,li - font-size: $fs diff --git a/source/css/_layout/md.styl b/source/css/_layout/md.styl index 426894a..3f1ee22 100644 --- a/source/css/_layout/md.styl +++ b/source/css/_layout/md.styl @@ -25,9 +25,19 @@ article.md.content color: var(--text-p0) padding-top: 1rem margin-bottom: 1em + line-height: 1.8 &:hover a.headerlink:before opacity: 1 + blockquote,ul,ol + p,ul,ol + font-size: $fs-14 + line-height: 1.5 + p,blockquote,.tag-plugin,ul,ol,.highlight,table + margin-top: var(--gap-p) + margin-bottom: var(--gap-p) + * + --gap-p: .5rem // titles article.md.content @@ -88,19 +98,17 @@ article.md pre // div article.md>div - margin: 1rem 0 + margin: var(--gap-p) 0 // blockquote article.md blockquote - margin: 1rem 0 + margin-left: 0 + margin-right: 0 padding: 1rem background: var(--card) border-left: 4px solid $color-theme border-radius: $border-block color: var(--text-p2) box-shadow: $boxshadow-card - p - margin: 0.5em 0 - font-size: $fs-14 article.md img diff --git a/source/css/_layout/tag-plugins/checkbox.styl b/source/css/_layout/tag-plugins/checkbox.styl index b7ce974..27d1ec5 100644 --- a/source/css/_layout/tag-plugins/checkbox.styl +++ b/source/css/_layout/tag-plugins/checkbox.styl @@ -1,8 +1,8 @@ .md .checkbox display: flex - margin: 0.25em 0 font-size: $fs-15 line-height: 1.2 + --gap-p: .25rem input -webkit-appearance: none -moz-appearance: none diff --git a/source/css/_layout/tag-plugins/folding.styl b/source/css/_layout/tag-plugins/folding.styl index 22fc9e8..6883349 100644 --- a/source/css/_layout/tag-plugins/folding.styl +++ b/source/css/_layout/tag-plugins/folding.styl @@ -49,7 +49,6 @@ details[open] border-bottom-left-radius: $border-block border-bottom-right-radius: $border-block font-size: $fs-15 - inside-box() >:first-child margin-top: 0 >:last-child diff --git a/source/css/_layout/tag-plugins/note.styl b/source/css/_layout/tag-plugins/note.styl index 7dffac9..2e091ea 100644 --- a/source/css/_layout/tag-plugins/note.styl +++ b/source/css/_layout/tag-plugins/note.styl @@ -5,17 +5,17 @@ margin-bottom: 1rem padding: 0 1rem border-radius: $border-block - font-size: $fs-15 background: var(--theme-bg) border: 1px solid var(--theme) color: var(--text-p1) >.title - inside-box: $fs-15 + font-size: $fs-15 line-height: 1.2 margin-top: 1rem >.body - inside-box: $fs-14 - line-height: 1.5 + &,p + font-size: $fs-14 + line-height: 1.5 margin-top: .5rem margin-bottom: 1rem >.body:only-child diff --git a/source/css/_plugins/swiper.styl b/source/css/_plugins/swiper.styl index dbca383..f52863b 100644 --- a/source/css/_plugins/swiper.styl +++ b/source/css/_plugins/swiper.styl @@ -3,6 +3,7 @@ .swiper-container width: 100% border-radius: 4px + --gap-p: 2rem .swiper-container:not(.swiper-container-initialized) display: none div.swiper-slide