From 645dbad4b865168e50ef76b1b128328710e8aaaf Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Fri, 10 Jun 2022 23:29:21 +0800 Subject: [PATCH] css --- source/css/_common/base.styl | 9 +++++++++ source/css/_layout/md.styl | 16 ++++------------ source/css/_layout/partial/article-footer.styl | 2 -- source/css/_layout/sidebar/sidebar.styl | 2 -- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/source/css/_common/base.styl b/source/css/_common/base.styl index f1a895d..0b95844 100644 --- a/source/css/_common/base.styl +++ b/source/css/_common/base.styl @@ -12,6 +12,15 @@ a &:hover color: $color-hover +// md > a +p, li + >a:not([class]) + margin: 0 1px + padding: 4px + border-radius: 4px + &:hover + color: darken($color-hover, 10) + background: alpha($color-hover, 0.08) hr color: var(--text-meta) diff --git a/source/css/_layout/md.styl b/source/css/_layout/md.styl index 736781d..0b21d06 100644 --- a/source/css/_layout/md.styl +++ b/source/css/_layout/md.styl @@ -91,21 +91,13 @@ article.md.content h1+h2 margin-top: -0.5rem h2+h3 - margin-top: -1rem + margin-top: -0.5rem h3+h4 - margin-top: -1rem + margin-top: -0.5rem h4+h5 - margin-top: -1rem + margin-top: -0.5rem h5+h6 - margin-top: -1rem - -// a -article.md - p, li:not([class]) - >a:not([class]) - font-weight: 500 - &:hover - text-decoration: underline + margin-top: -0.5rem article.md p font-size: $fs-p diff --git a/source/css/_layout/partial/article-footer.styl b/source/css/_layout/partial/article-footer.styl index ce43dec..319aaf0 100644 --- a/source/css/_layout/partial/article-footer.styl +++ b/source/css/_layout/partial/article-footer.styl @@ -23,8 +23,6 @@ ul margin: 0 overflow: hidden - a:hover - text-decoration: underline .post-title margin: 0.5rem 0 line-height: 1.2 diff --git a/source/css/_layout/sidebar/sidebar.styl b/source/css/_layout/sidebar/sidebar.styl index b635ff6..55d4272 100644 --- a/source/css/_layout/sidebar/sidebar.styl +++ b/source/css/_layout/sidebar/sidebar.styl @@ -188,8 +188,6 @@ nav.menu margin-top: .5em margin-bottom: .5em line-height: 1.5 - >a:hover - text-decoration: underline .widget-header+.widget-body margin-top: 0