Skip to content

Commit

Permalink
ui: optimize custom button tag style
Browse files Browse the repository at this point in the history
  • Loading branch information
XPoet committed Sep 19, 2023
1 parent a163a78 commit 40d0aa1
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 50 deletions.
2 changes: 1 addition & 1 deletion layout/_partial/post/reward-author.ejs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="reward-author-container border-box flex-center">
<button class="border-box tooltip-img"
<button class="keep-button border-box tooltip-img"
data-tooltip-img-url="<%= theme?.post?.reward?.img_link %>"
data-tooltip-img-trigger="hover"
data-tooltip-img-style="top: -8px;"
Expand Down
49 changes: 0 additions & 49 deletions source/css/common/basic.styl
Original file line number Diff line number Diff line change
Expand Up @@ -187,55 +187,6 @@ img {
}


// ======================================================================
// button
// ======================================================================
button {
position relative
box-sizing border-box
margin 0
padding 0.6rem 1rem
color var(--text-color-3)
font-size 1rem
background var(--background-color-1)
border none
border-radius 0.4rem
box-shadow 0.1rem 0.2rem 0.4rem var(--shadow-color)
cursor pointer

i {
color var(--text-color-3)
}


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

i {
color var(--background-color-1)
}
}


&.size-small {
padding 0.5rem 0.8rem
font-size 0.8rem
border-radius 0.3rem
box-shadow 0.1rem 0.1rem 0.3rem var(--shadow-color)
}


&.size-large {
width 100%
padding 1rem
font-size 1.1rem
border-radius 0.5rem
box-shadow 0.1rem 0.2rem 0.5rem var(--shadow-color)
}
}


// ======================================================================
// flex center
// ======================================================================
Expand Down
47 changes: 47 additions & 0 deletions source/css/common/tags/keep-button.styl
Original file line number Diff line number Diff line change
@@ -1,4 +1,51 @@
.keep-button {
position relative
box-sizing border-box
margin 0.3rem 0.6rem
padding 0.6rem 1rem
color var(--text-color-3)
font-size 1rem
background var(--background-color-1)
border none
border-radius 0.4rem
box-shadow 0.1rem 0.2rem 0.4rem var(--shadow-color)
cursor pointer


i {
color var(--text-color-3)
}


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

i {
color var(--background-color-1)
}
}


&.size-small {
margin 0.2rem 0.4rem
padding 0.5rem 0.8rem
font-size 0.8rem
border-radius 0.3rem
box-shadow 0.1rem 0.1rem 0.3rem var(--shadow-color)
}


&.size-large {
width 100%
margin 0.6rem 0
padding 1rem
font-size 1.1rem
border-radius 0.5rem
box-shadow 0.1rem 0.2rem 0.5rem var(--shadow-color)
}


&.color-primary {
color var(--note-primary-color)
background-color var(--note-primary-background-color)
Expand Down

0 comments on commit 40d0aa1

Please sign in to comment.