[opt] border-radius

This commit is contained in:
xaoxuu 2024-02-03 16:36:29 +08:00
parent 62a8a2b334
commit d678b4ff1e
18 changed files with 27 additions and 25 deletions

View File

@ -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%)' # 浅色背景颜色

View File

@ -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)

View File

@ -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
@ -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)
@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,5 +1,7 @@
.banner
border-radius: $border-card
&.top
border-radius: $border-card-l
position: relative
overflow: hidden
display: flex

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -1,3 +1,3 @@
.md-text
.aplayer
border-radius: $border-block
border-radius: $border-card

View File

@ -1,4 +1,4 @@
.cmt-body.artalk .artalk
--at-color-main: $color-theme
.atk-main-editor
border-radius: $border-block
border-radius: $border-card

View File

@ -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
@ -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
@ -86,7 +86,7 @@
.tk-submit
padding: 1rem 1rem 0 1rem;
border-radius: $border-block;
border-radius: $border-card;
background: var(--card);
.tk-tag

View File

@ -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

View File

@ -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)
@ -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