[opt] css

This commit is contained in:
xaoxuu 2022-12-15 22:42:48 +08:00
parent e4f6ac690a
commit 309ea5bc01
18 changed files with 29 additions and 24 deletions

View File

@ -334,8 +334,8 @@ style:
border-radius: border-radius:
card: 12px card: 12px
block: 12px block: 12px
button: 8px bar: 6px
image: 8px image: 6px
color: color:
# 动态颜色(会根据明暗主题重设明度值,只用关心色相和饱和度即可) # 动态颜色(会根据明暗主题重设明度值,只用关心色相和饱和度即可)
background: 'hsl(212 16% 98%)' # 浅色背景颜色 background: 'hsl(212 16% 98%)' # 浅色背景颜色

View File

@ -16,6 +16,6 @@ page.robots = 'none';
<%- __('page.error.why') %> <%- __('page.error.why') %>
</p> </p>
<br><br> <br><br>
<a class='button theme' id='back' href="<%- config.root %>"><%- __('page.error.action') %></a> <a class='button' id='back' href="<%- config.root %>"><%- __('page.error.action') %></a>
</article> </article>
<%- partial('_partial/plugins/comments/layout') %> <%- partial('_partial/plugins/comments/layout') %>

View File

@ -39,7 +39,7 @@ function layoutWikiCover() {
el += '<div class="description">' + desc + '</div>'; el += '<div class="description">' + desc + '</div>';
} }
el += '<div class="start-wrap">'; el += '<div class="start-wrap">';
el += '<a class="button theme start" href="#start">' + (proj.start || __('btn.getting_started')) + '</a>'; el += '<a class="button start" href="#start">' + (proj.start || __('btn.getting_started')) + '</a>';
el += '</div>'; el += '</div>';
el += '</article>'; el += '</article>';
el += '</div>'; el += '</div>';

View File

@ -6,5 +6,5 @@ blockquote
background: var(--block) background: var(--block)
$bd-left = 4px $bd-left = 4px
border-left: $bd-left solid var(--text-meta) border-left: $bd-left solid var(--text-meta)
border-radius: $bd-left $border-button $border-button $bd-left border-radius: $bd-left $border-bar $border-bar $bd-left
color: var(--text-p2) color: var(--text-p2)

View File

@ -9,7 +9,7 @@ a.button
font-weight: 500 font-weight: 500
line-height: 1 line-height: 1
padding: 0.75rem 2rem padding: 0.75rem 2rem
border-radius: 3px border-radius: $border-button
trans1: background trans1: background
font-size: $fs-15 font-size: $fs-15
&.theme &.theme
@ -17,6 +17,10 @@ a.button
color: var(--card) color: var(--card)
&:hover &:hover
background: $color-hover background: $color-hover
&.start
border-radius: 100px
background: var(--text-p1)
color: var(--card)
a[onclick]:hover a[onclick]:hover
cursor: pointer cursor: pointer

View File

@ -34,8 +34,8 @@ p>code:not([class]),li>code:not([class])
span span
padding: 4px 0.5rem padding: 4px 0.5rem
display: block display: block
border-bottom-left-radius: $border-button border-bottom-left-radius: $border-bar
border-bottom-right-radius: $border-button border-bottom-right-radius: $border-bar
background: var(--block-hover) background: var(--block-hover)
>table >table
overflow: auto overflow: auto

View File

@ -57,8 +57,9 @@ $fs-codeblock = convert(hexo-config('style.font-size.codeblock'))
$border-card = convert(hexo-config('style.border-radius.card')) $border-card = convert(hexo-config('style.border-radius.card'))
$border-block = convert(hexo-config('style.border-radius.block')) $border-block = convert(hexo-config('style.border-radius.block'))
$border-button = convert(hexo-config('style.border-radius.button')) $border-bar = convert(hexo-config('style.border-radius.bar'))
$border-image = convert(hexo-config('style.border-radius.image')) $border-image = convert(hexo-config('style.border-radius.image'))
$border-button = 4px
// //
:root :root

View File

@ -83,7 +83,7 @@ scrollbar-codeblock($height = 4px)
&::-webkit-scrollbar-thumb &::-webkit-scrollbar-thumb
background: transparent background: transparent
cursor: pointer cursor: pointer
border-radius: $border-button border-radius: $border-bar
&:hover &:hover
&::-webkit-scrollbar-thumb &::-webkit-scrollbar-thumb
background: var(--text-meta) background: var(--text-meta)

View File

@ -47,7 +47,7 @@
&.child &.child
padding-left: 2rem padding-left: 2rem
padding: .5em 1rem padding: .5em 1rem
border-radius: $border-button border-radius: $border-bar
color: var(--text-p2) color: var(--text-p2)
align-items: center align-items: center
justify-content: space-between justify-content: space-between

View File

@ -17,7 +17,6 @@
display: inline-block display: inline-block
background: #FDB62F background: #FDB62F
color: black color: black
border-radius: 4px
border: 2px solid black border: 2px solid black
@media screen and (max-width: $device-tablet) @media screen and (max-width: $device-tablet)

View File

@ -14,7 +14,7 @@
a.more a.more
padding: 0.25rem 0.5rem padding: 0.25rem 0.5rem
border-radius: $border-button border-radius: $border-bar
color: var(--text-p1) color: var(--text-p1)
article.md-text.content+.related-wrap article.md-text.content+.related-wrap

View File

@ -3,7 +3,7 @@
justify-content: space-between justify-content: space-between
box-sizing: border-box box-sizing: border-box
background: var(--block) background: var(--block)
border-radius: $border-button border-radius: $border-bar
border: 1px solid var(--block-border) border: 1px solid var(--block-border)
overflow: hidden overflow: hidden
width: 320px width: 320px

View File

@ -1,7 +1,7 @@
.tag-plugin.folders .tag-plugin.folders
display: block display: block
margin: 1rem 0 margin: 1rem 0
border-radius: $border-button border-radius: $border-bar
font-size: $fs-14 font-size: $fs-14
border: 1px solid var(--theme-border) border: 1px solid var(--theme-border)
overflow: hidden overflow: hidden

View File

@ -2,7 +2,7 @@ details.folding
display: block display: block
padding: 1rem padding: 1rem
margin: 1rem 0 margin: 1rem 0
border-radius: $border-button border-radius: $border-bar
font-size: $fs-14 font-size: $fs-14
background: var(--theme-bg2) background: var(--theme-bg2)
border: 1px solid var(--theme-border) border: 1px solid var(--theme-border)
@ -10,7 +10,7 @@ details.folding
cursor: pointer cursor: pointer
padding: .75rem 1rem padding: .75rem 1rem
margin: 0 - 1rem margin: 0 - 1rem
border-radius: $border-button border-radius: $border-bar
color: var(--text-p2) color: var(--text-p2)
font-weight: 500 font-weight: 500
position: relative position: relative
@ -29,6 +29,7 @@ details.folding
top: 50% top: 50%
transform: translateY(-50%) transform: translateY(-50%)
right: 1rem right: 1rem
line-height: 1
details.folding[open] details.folding[open]
@ -47,8 +48,8 @@ details.folding[open]
margin: 0 - 1rem margin: 0 - 1rem
margin-top: 0 margin-top: 0
background: var(--card) background: var(--card)
border-bottom-left-radius: 'calc(%s - 1px)' % $border-button border-bottom-left-radius: 'calc(%s - 1px)' % $border-bar
border-bottom-right-radius: 'calc(%s - 1px)' % $border-button border-bottom-right-radius: 'calc(%s - 1px)' % $border-bar
font-size: $fs-15 font-size: $fs-15
>:first-child >:first-child
margin-top: 0 margin-top: 0

View File

@ -18,7 +18,7 @@
@media screen and (max-width: $device-mobile-375) @media screen and (max-width: $device-mobile-375)
width: 100% width: 100%
box-shadow: $boxshadow-card box-shadow: $boxshadow-card
border-radius: $border-button border-radius: $border-bar
trans2: box-shadow transform trans2: box-shadow transform
&:hover &:hover
box-shadow: $boxshadow-card-float box-shadow: $boxshadow-card-float

View File

@ -1,7 +1,7 @@
details.toc details.toc
background: var(--block) background: var(--block)
border: 1px solid var(--block-border) border: 1px solid var(--block-border)
border-radius: $border-button border-radius: $border-bar
overflow: hidden overflow: hidden
color: var(--text-p2) color: var(--text-p2)
summary summary

View File

@ -16,7 +16,7 @@
line-height: 1 line-height: 1
box-sizing: border-box box-sizing: border-box
font-family: $ff-body font-family: $ff-body
border-radius: $border-button border-radius: $border-bar
background-color: var(--card) background-color: var(--card)
color: var(--text-p0) color: var(--text-p0)
border: 1px solid var(--block-border) border: 1px solid var(--block-border)
@ -38,7 +38,7 @@
font-size: $fs-14 font-size: $fs-14
padding: 2rem padding: 2rem
background: var(--block) background: var(--block)
border-radius: $border-button border-radius: $border-bar
#search-result #search-result
ul.search-result-list ul.search-result-list

View File

@ -5,7 +5,7 @@
// //
.widget-wrapper.toc.multi .doc-tree .widget-wrapper.toc.multi .doc-tree
border-radius: $border-button border-radius: $border-bar
background: var(--block) background: var(--block)
overflow: hidden overflow: hidden
border: 1px solid var(--block-border) border: 1px solid var(--block-border)