Skip to content

Commit

Permalink
[opt] border-radius
Browse files Browse the repository at this point in the history
  • Loading branch information
xaoxuu committed Feb 3, 2024
1 parent 62a8a2b commit d678b4f
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 25 deletions.
8 changes: 4 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,10 @@ style:
prefix:
h2: https://api.iconify.design/ci:heading-h2.svg
border-radius:
card: 12px
block: 12px
bar: 8px
image: 6px
card-l: 16px # 侧边栏、文章横幅位置的圆角
card: 12px # 文章内大部分卡片的圆角
bar: 8px # 横条类元素的圆角
image: 12px # 图片圆角
color:
# 动态颜色(会根据明暗主题重设明度值,只用关心色相和饱和度即可)
background: 'hsl(212 16% 98%)' # 浅色背景颜色
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/blockquote.styl
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ blockquote
background: var(--block)
$bd-left = 4px
border-left: $bd-left solid var(--text-meta)
border-radius: $bd-left $border-bar $border-bar $bd-left
border-radius: $bd-left $border-card $border-card $bd-left
color: var(--text-p2)
6 changes: 3 additions & 3 deletions source/css/_common/highlight.styl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ p>code:not([class]),li>code:not([class])

.md-text .highlight, pre:not([class]):has(>code)
margin: var(--gap-p) 0
border-radius: $border-block
border-radius: $border-card
overflow: hidden
background: var(--block)
line-height: 1.5
Expand Down Expand Up @@ -78,7 +78,7 @@ p>code:not([class]),li>code:not([class])
--fgColor-default: var(--text-p1)
.gist-file
border: 1px solid var(--block-border)
border-radius: $border-block
border-radius: $border-card
overflow: hidden
.gist-data
border-bottom: 1px solid var(--block-border)
Expand All @@ -102,7 +102,7 @@ table:not([class])
color: var(--text-p3)
>.hljs
padding: 1rem
border-radius: $border-block
border-radius: $border-card
line-height: 1.5
box-sizing: border-box

Expand Down
2 changes: 1 addition & 1 deletion source/css/_custom.styl
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ $fsp1 = 'calc(%s - 1px)' % $fs-body
$fsp2 = 'calc(%s - 2px)' % $fs-body
$fsp3 = 'calc(%s - 3px)' % $fs-body

$border-card-l = convert(hexo-config('style.border-radius.card-l'))
$border-card = convert(hexo-config('style.border-radius.card'))
$border-block = convert(hexo-config('style.border-radius.block'))
$border-bar = convert(hexo-config('style.border-radius.bar'))
$border-image = convert(hexo-config('style.border-radius.image'))
$border-button = 4px
Expand Down
2 changes: 1 addition & 1 deletion source/css/_layout/partial/article-footer.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
margin-top: 4rem
padding: 1rem
background: var(--block)
border-radius: $border-block
border-radius: $border-card
border: 1px solid var(--block-border)
&:empty
display: none
Expand Down
2 changes: 1 addition & 1 deletion source/css/_layout/sidebar/sidebar.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.l_left
margin: 8px 8px 8px 0
height: 'calc(%s - 16px)' % 100vh
border-radius: $border-card
border-radius: $border-card-l
overflow: hidden
.header
margin: var(--gap-l) var(--gap-l) 0
Expand Down
2 changes: 2 additions & 0 deletions source/css/_layout/tag-plugins/banner.styl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.banner
border-radius: $border-card
&.top
border-radius: $border-card-l
position: relative
overflow: hidden
display: flex
Expand Down
2 changes: 1 addition & 1 deletion source/css/_layout/tag-plugins/folding.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ details.folding
display: block
padding: 1rem
margin: 1rem 0
border-radius: $border-block
border-radius: $border-card
background: var(--theme-block)
border: 1px solid var(--theme-border)
summary
Expand Down
2 changes: 1 addition & 1 deletion source/css/_layout/tag-plugins/image.styl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
font-size: 1.125rem
padding: 6px
line-height: 0
border-radius: 4px
border-radius: 40px
trans3: color opacity background
color: var(--text-p1)
&:hover
Expand Down
2 changes: 1 addition & 1 deletion source/css/_layout/tag-plugins/link.styl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
width: 300px
max-width: 100%
box-shadow: $boxshadow-card
border-radius: $border-bar
border-radius: $border-card
hover-float()

.md-text .link-card.plain
Expand Down
2 changes: 1 addition & 1 deletion source/css/_layout/tag-plugins/note.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.md-text .tag-plugin.note
position: relative
padding: 0.25rem 1rem
border-radius: $border-block
border-radius: $border-card
background: var(--theme-block)
overflow: hidden
if hexo-config('tag_plugins.note.border') == true
Expand Down
2 changes: 1 addition & 1 deletion source/css/_layout/tag-plugins/okr.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.md-text .tag-plugin.okr
position: relative
border-radius: $border-block
border-radius: $border-card
background: var(--theme-block)
if hexo-config('tag_plugins.okr.border') == true
border: 1px solid var(--theme-border)
Expand Down
2 changes: 1 addition & 1 deletion source/css/_layout/widgets/ghrepo.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
padding: 0.75rem 0.5rem
color: var(--text-p2)
background: var(--card)
border-radius: $border-block
border-radius: $border-card
box-shadow: $boxshadow-card
>div+div
margin-top: 0.5rem
Expand Down
2 changes: 1 addition & 1 deletion source/css/_plugins/aplayer.styl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.md-text
.aplayer
border-radius: $border-block
border-radius: $border-card
2 changes: 1 addition & 1 deletion source/css/_plugins/comments/artalk.styl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.cmt-body.artalk .artalk
--at-color-main: $color-theme
.atk-main-editor
border-radius: $border-block
border-radius: $border-card
6 changes: 3 additions & 3 deletions source/css/_plugins/comments/twikoo.styl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
width: auto
border: none
padding: 6px 2rem
border-radius: $border-block
border-radius: $border-card
background: var(--block)
color: var(--text-p1)
line-height: 2
Expand All @@ -74,7 +74,7 @@
margin-bottom: 1rem
border: 1px dashed var(--block-border);
padding: 1rem;
border-radius: $border-block;
border-radius: $border-card;
background: var(--card);

&:hover
Expand All @@ -86,7 +86,7 @@

.tk-submit
padding: 1rem 1rem 0 1rem;
border-radius: $border-block;
border-radius: $border-card;
background: var(--card);

.tk-tag
Expand Down
2 changes: 1 addition & 1 deletion source/css/_plugins/copycode.styl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
cursor: pointer
margin-right: 4px
margin-top: 4px
border-radius: 'calc(%s - 4px)' % $border-block
border-radius: 'calc(%s - 4px)' % $border-card

.highlight:hover
.code:before
Expand Down
4 changes: 2 additions & 2 deletions source/css/_plugins/tianli_gpt.styl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

.post-TianliGPT
background: var(--block)
border-radius: $border-block
border-radius: $border-card
padding: 12px
line-height: 1.3
border: var(--style-border-always)
Expand All @@ -44,7 +44,7 @@
margin-top: 12px
padding: 8px 12px
background: var(--card)
border-radius: $border-block
border-radius: $border-card
border: var(--style-border-always)
font-size: 15px
line-height: 1.4
Expand Down

0 comments on commit d678b4f

Please sign in to comment.