Skip to content

Commit 4d8d398

Browse files
committed
Fixing pixel scroll helper
1 parent 83f2e33 commit 4d8d398

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

src/sphinx_book_theme/assets/styles/base/_base.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33
*********************************************/
44
// For the helper pixel that we can watch to decide whether we've scrolled
55
.sbt-scroll-pixel-helper {
6-
position: absolute;
76
width: 0px;
87
height: 0px;
9-
top: 0;
10-
left: 0;
118
}
129

1310
// Hide an element without display: none but so that it takes no space

src/sphinx_book_theme/assets/styles/sections/_header-primary.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
.header__end {
4545
display: flex;
4646
flex-wrap: nowrap;
47-
gap: 0.5rem;
47+
gap: 0.75rem;
4848

4949
// On narrow screens, the header items show flow vertically and snap to left
5050
@media (max-width: $breakpoint-md) {
@@ -117,7 +117,7 @@ input#__header {
117117

118118
ul#navbar-icon-links {
119119
flex-direction: row;
120-
gap: 0.5em;
120+
gap: 0.75rem;
121121
}
122122

123123
.header-content-item {

src/sphinx_book_theme/theme/sphinx_book_theme/layout.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949
{% endblock %}
5050

5151
{% block docs_main %}
52-
<!-- A tiny helper pixel to detect if we've scrolled -->
53-
<div class="sbt-scroll-pixel-helper"></div>
5452
<!-- Main content -->
5553
<div class="col py-0 content-container">
5654
{% block docs_body %}
55+
<!-- A tiny helper pixel to detect if we've scrolled past the top -->
56+
<div class="sbt-scroll-pixel-helper"></div>
5757
<div class="header-article row sticky-top noprint">
5858
{% include "sections/header-article.html" %}
5959
</div>

0 commit comments

Comments
 (0)