[opt] css

This commit is contained in:
xaoxuu 2024-01-03 13:28:04 +08:00
parent 655b175eb9
commit 5346950d4d
9 changed files with 24 additions and 24 deletions

View File

@ -89,6 +89,6 @@ $border-button = 4px
// shadow // shadow
$boxshadow-card = 0 1px 2px 0px rgba(0, 0, 0, 0.1) $boxshadow-card = 0 1px 2px 0px rgba(0, 0, 0, 0.1)
$boxshadow-float = 0 4px 8px 0px rgba(0, 0, 0, 0.1) $boxshadow-float = 0 4px 8px 0px rgba(0, 0, 0, 0.1)
$boxshadow-card-float = 0 2px 4px 0px rgba(0, 0, 0, 0.1), 0 4px 8px 0px rgba(0, 0, 0, 0.1), 0 8px 16px 0px rgba(0, 0, 0, 0.1) $boxshadow-card-float = 0 12px 16px -4px rgba(0, 0, 0, 0.2)
$boxshadow-button = 0 0 2px 0px rgba(0, 0, 0, 0.04), 0 0 8px 0px rgba(0, 0, 0, 0.04) $boxshadow-button = 0 0 2px 0px rgba(0, 0, 0, 0.04), 0 0 8px 0px rgba(0, 0, 0, 0.04)
$boxshadow-block = 0 1px 4px 0px rgba(0, 0, 0, 0.02), 0 2px 8px 0px rgba(0, 0, 0, 0.02) $boxshadow-block = 0 1px 4px 0px rgba(0, 0, 0, 0.02), 0 2px 8px 0px rgba(0, 0, 0, 0.02)

View File

@ -97,3 +97,14 @@ hover-block($v, $h, $br = 4px)
trans2 color background trans2 color background
&:hover &:hover
background: var(--block-hover) background: var(--block-hover)
floatable-trans()
trans2 transform box-shadow
floatable-float()
box-shadow: 0 12px 20px -4px rgba(0, 0, 0, 0.15)
transform: translate3d(0, -2px, 0)
hover-float()
floatable-trans()
&:hover
floatable-float()

View File

@ -54,7 +54,6 @@
height: 1.5em height: 1.5em
.post-list .post-card:hover .post-list .post-card:hover
box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.1), 0 4px 16px 0px rgba(0, 0, 0, 0.1)
img img
transform: scale(1.02) transform: scale(1.02)
filter: brightness(80%) filter: brightness(80%)

View File

@ -24,11 +24,11 @@ nav.cap
>p >p
margin: 0 margin: 0
a a
padding: .25rem 1rem padding: .25rem 0.75rem
margin: 10px 0 8px 0 margin: 10px 0.25rem 8px 0.25rem
line-height: 2 line-height: 2
color: var(--text-p3) color: var(--text-p3)
border-radius: 4px border-radius: $border-button
font-weight: 500 font-weight: 500
white-space: nowrap white-space: nowrap
position: relative position: relative
@ -37,8 +37,8 @@ nav.cap
height: 2px height: 2px
position: absolute position: absolute
bottom: -8px bottom: -8px
left: 1rem left: 0.75rem
right: 1rem right: 0.75rem
background: $color-theme background: $color-theme
border-radius: 2px border-radius: 2px
pointer-events: none pointer-events: none

View File

@ -32,7 +32,7 @@
// transform // transform
.users-wrap .user-card .card-link .users-wrap .user-card .card-link
>img >img
trans2 transform box-shadow floatable-trans()
&:hover &:hover
background: var(--block-hover) background: var(--block-hover)
img img

View File

@ -26,7 +26,4 @@
&[bg='card']>.cell &[bg='card']>.cell
background: var(--card) background: var(--card)
box-shadow: $boxshadow-card box-shadow: $boxshadow-card
trans2 box-shadow transform hover-float()
&:hover
transform: translateY(-1px)
box-shadow: $boxshadow-card-float

View File

@ -13,10 +13,7 @@
max-width: 100% max-width: 100%
box-shadow: $boxshadow-card box-shadow: $boxshadow-card
border-radius: $border-bar border-radius: $border-bar
trans2: box-shadow transform hover-float()
&:hover
box-shadow: $boxshadow-card-float
transform: translateY(-1px)
.md-text .link-card.plain .md-text .link-card.plain
flex-direction: row flex-direction: row

View File

@ -49,8 +49,7 @@
// transform // transform
.sites-wrap .site-card .card-link .sites-wrap .site-card .card-link
>img >img
trans2: box-shadow transform floatable-trans()
&:hover &:hover
>img >img
box-shadow: $boxshadow-float, $boxshadow-card-float floatable-float()
transform: translateY(-2px)

View File

@ -6,14 +6,11 @@
background: var(--card) background: var(--card)
border-radius: $border-block border-radius: $border-block
box-shadow: $boxshadow-card box-shadow: $boxshadow-card
trans2 box-shadow transform hover-float()
>div+div >div+div
margin-top: 0.5rem margin-top: 0.5rem
span span
color: var(--text-p2) color: var(--text-p2)
&:hover
box-shadow: $boxshadow-card-float
transform: translateY(-1px)
svg svg
margin-right: 4px margin-right: 4px
.flex-row .flex-row