Skip to content

Commit

Permalink
fix(#15): Delete the hover effect of the back2top button
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyib committed Sep 16, 2019
1 parent 4053303 commit 37a1e69
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
3 changes: 1 addition & 2 deletions layout/_partials/widgets/back2top.pug
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
- var fa_prefix = theme.fa_prefix || 'fa'

div#back2top.back2top
div(data-popover=__("back2top") data-popover-pos="up")
i.back2top-icon(class=`${fa_prefix} fa-${theme.back2top.icon.name}`)
i.back2top-icon(class=`${fa_prefix} fa-${theme.back2top.icon.name}`)
4 changes: 0 additions & 4 deletions source/css/_common/components/widgets/back2top.styl
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,4 @@
color: convert(hexo-config('back2top.icon.hover_color') || '#999');
}
}

&[data-popover][data-popover-pos='up']:hover::before {
transform: translate(-50%, -125%);
}
}
4 changes: 0 additions & 4 deletions source/css/_common/components/widgets/sticky-top.styl
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
color: convert(hexo-config('stick_top.color' || '#999'));
transform: scale(1.2) rotate(stick-top-rotate);
}

&[data-popover][data-popover-pos='up']:hover::before {
transform: translate(-50%, -100%);
}
}

.archive {
Expand Down
8 changes: 5 additions & 3 deletions source/css/_common/scaffolding/utils.styl
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ popover-bg-color = alpha(#000, .7);
padding: .2rem .6rem;
}

[data-popover][data-popover-pos='up']:hover::before {
opacity: 1;
transform: translate(-50%, -115%);
@media (min-width: $md-width) {
[data-popover-pos='up']:hover::before {
opacity: 1;
transform: translate(-50%, -120%);
}
}

// "Alert" component
Expand Down

0 comments on commit 37a1e69

Please sign in to comment.