Skip to content

Commit

Permalink
ui: update keep-container box-shadow style
Browse files Browse the repository at this point in the history
  • Loading branch information
XPoet committed Sep 6, 2023
1 parent 7187d4e commit 58adea9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 39 deletions.
30 changes: 0 additions & 30 deletions source/css/common/basic.styl
Original file line number Diff line number Diff line change
Expand Up @@ -186,36 +186,6 @@ img {
}


// ======================================================================
// button
// ======================================================================
button {
margin 0
padding 0
background transparent
border 0
outline none
cursor pointer
}

.btn {
position relative
display inline-block
padding 0.4rem 1rem
white-space nowrap
text-align center
background var(--background-color-1)
border-radius 0.3rem
box-shadow 2px 2px 5px var(--shadow-color)
cursor pointer

&:hover {
color var(--background-color-1)
background var(--primary-color)
}
}


// ======================================================================
// flex center
// ======================================================================
Expand Down
4 changes: 2 additions & 2 deletions source/css/common/keep-theme.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keep-container(sValue, pValue, mbValue) {
padding pValue
background var(--content-background-color)
border-radius var(--box-border-radius)
box-shadow 2px 2px 5px var(--shadow-color)
box-shadow 0 0 8px var(--shadow-color)

if (sValue != 1) {
transition-t("transform", "0", "0.2", "linear")
Expand All @@ -14,7 +14,7 @@ keep-container(sValue, pValue, mbValue) {
if (sValue != 1) {
transform scale(sValue)
}
box-shadow 2px 2px 8px var(--shadow-hover-color)
box-shadow 0 0 12px var(--shadow-hover-color)
}

+keep-tablet() {
Expand Down
8 changes: 4 additions & 4 deletions source/css/common/variables.styl
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ $badge-background-color = lighten($text-color-3, 40%)
$border-color = darken($background-color-1, 30%)
$selection-color = lighten($primary-color, 10%)

$shadow-color = rgba(0, 0, 0, 0.2)
$shadow-hover-color = rgba(0, 0, 0, 0.3)
$shadow-color = rgba(0, 0, 0, 0.16)
$shadow-hover-color = rgba(0, 0, 0, 0.22)

$scrollbar-color = lighten($text-color-3, 10%)
$scrollbar-background-color = darken($background-color-1, 10%)
Expand Down Expand Up @@ -144,8 +144,8 @@ $dark-badge-background-color = lighten($dark-text-color-3, 40%)
$dark-border-color = lighten($dark-background-color-1, 30%)
$dark-selection-color = darken($selection-color, 20%)

$dark-shadow-color = rgba(128, 128, 128, 0.2)
$dark-shadow-hover-color = rgba(128, 128, 128, 0.28)
$dark-shadow-color = rgba(120, 120, 120, 0.18)
$dark-shadow-hover-color = rgba(120, 120, 120, 0.24)

$dark-scrollbar-color = darken($dark-background-color-1, 10%)
$dark-scrollbar-background-color = lighten($dark-background-color-1, 20%)
Expand Down
4 changes: 2 additions & 2 deletions source/css/layout/_partial/header.styl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ $logo-image-box-width = 2.8rem
height 100%
padding-top $scroll-progress-bar-height
background var(--background-color-1)
box-shadow 2px 2px 5px var(--shadow-color)
box-shadow 1px 2px 6px var(--shadow-color)

&:hover {
box-shadow 2px 2px 8px var(--shadow-hover-color)
box-shadow 1px 2px 10px var(--shadow-hover-color)
}

.header-content {
Expand Down
2 changes: 1 addition & 1 deletion source/css/layout/home-content.styl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
position relative
overflow hidden

keep-container(var(--home-post-hover-scale), 0, 2.6rem)
keep-container(var(--home-post-hover-scale), 0, 2.8rem)

.home-article-item-top {
width 100%
Expand Down

0 comments on commit 58adea9

Please sign in to comment.