Skip to content

Commit cc76fe4

Browse files
committed
Optimize the tooltip position of sharing icons.
1 parent 2bca1dc commit cc76fe4

2 files changed

Lines changed: 19 additions & 11 deletions

File tree

_includes/post-sharing.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99

1010
<div class="share-wrapper">
1111
<span class="share-label ml-1 mr-1">{{ site.data.share.label }}</span>
12-
<span class="share-icon">
12+
<span class="share-icons">
1313
{% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
1414
{% assign url = page.url | relative_url | prepend: site.url %}
1515

1616
{% for share in site.data.share.platforms %}
1717
{% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url %}
1818
<a href="{{ link }}" data-toggle="tooltip" data-placement="top"
1919
title="{{ share.type }}" target="_blank">
20-
<i class="fa-fw {{ share.icon }} mr-1"></i>
20+
<i class="fa-fw {{ share.icon }}"></i>
2121
</a>
2222
{% endfor %}
2323

24-
<i class="fa-fw fas fa-link mr-1 small" onclick="copyLink()"
24+
<i class="fa-fw fas fa-link small" onclick="copyLink()"
2525
data-toggle="tooltip" data-placement="top" title="Copy link"></i>
2626

2727
</span>

assets/css/post.scss

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,16 +216,24 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
216216
.share-wrapper {
217217
vertical-align: middle;
218218
user-select: none;
219-
.share-icon {
219+
.share-icons {
220220
font-size: 1.2rem;
221-
a:hover {
222-
text-decoration: none;
223-
>i {
224-
@extend %btn-share-hovor;
221+
a {
222+
&:not(:last-child) {
223+
margin-right: .25rem;
224+
}
225+
&:hover {
226+
text-decoration: none;
227+
>i {
228+
@extend %btn-share-hovor;
229+
}
225230
}
226231
}
227-
i:hover {
228-
@extend %btn-share-hovor;
232+
>i {
233+
padding-top: .35rem;
234+
&:hover {
235+
@extend %btn-share-hovor;
236+
}
229237
}
230238
.fab {
231239
&.fa-twitter {
@@ -242,7 +250,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
242250
}
243251
}
244252

245-
} // .share-icon
253+
} // .share-icons
246254

247255
.fas.fa-link {
248256
@include btn-sharing-color(rgb(171, 171, 171));

0 commit comments

Comments
 (0)