Skip to content

Commit 8d07de9

Browse files
authored
fix vertical alignment of github stars button in all states (#3006)
Without uBlock, the button's alt-text would be 1px lower than the rest of the nav items, and inconsistently capitalized. With uBlock, the button would be slightly too high up. This is on Firefox. The solution is to apply styles on the `span` that GitHub's JS inserts. However, using margin will make the entire nav jump during pageload, so position: relative seems more robust there.
1 parent 82eb2a6 commit 8d07de9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

www/themes/htmx-theme/static/css/site.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,9 @@ transition: visibility 0s 1s, opacity 1s linear;
419419
padding:1em 0;
420420
}
421421

422-
.github-stars {
423-
margin-top: 5px;
422+
.github-stars span {
423+
position: relative;
424+
top: 4px;
424425
}
425426

426427
/* Content */

www/themes/htmx-theme/templates/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
</div>
5555
<div>
5656
<div class="github-stars" hx-preserve="true" id="github-stars">
57-
<a class="github-button" href="https://github.com/bigskysoftware/htmx" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="octicon-star" data-show-count="true" aria-label="Star bigskysoftware/htmx on GitHub">Star</a>
57+
<a class="github-button" href="https://github.com/bigskysoftware/htmx" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="octicon-star" data-show-count="true" aria-label="Star bigskysoftware/htmx on GitHub">star</a>
5858
</div>
5959
</div>
6060
</div>

0 commit comments

Comments
 (0)