Skip to content

Commit b5c33b7

Browse files
authored
Docs fixes (#2446)
1 parent 4e8d075 commit b5c33b7

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

docs/options.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,6 +1791,7 @@ Some options support placeholders, like `{project}`, `{package}` or `{wheel}`, t
17911791
padding-left: 10px;
17921792
padding-right: 10px;
17931793
line-height: normal;
1794+
overflow: visible;
17941795
}
17951796
.rst-content h3 .badges code.cmd-line:before, .rst-content h3 .badges code.toml:before, .rst-content h3 .badges code.env-var:before {
17961797
content: ' ';

docs/theme_overrides/js/theme.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,21 @@ function ThemeNav () {
126126
});
127127
link.prepend(expand);
128128
});
129+
130+
// EDIT by joerick
131+
//
132+
// workaround a bug with the site in safari. safari navigates to the
133+
// anchor before the above code has run, specifically wrap with
134+
// .wy-table-responsive activates css rules that change the size of
135+
// tables, making anchor points move around.
136+
console.log('Document ready, checking for anchor in URL');
137+
const anchorEl = document.querySelector(window.location.hash);
138+
anchorEl.getBoundingClientRect(); // Force layout to ensure scrollIntoView works correctly
139+
if (anchorEl) {
140+
console.log('Anchor element:', anchorEl);
141+
anchorEl.scrollIntoView({ behavior: 'instant', block: 'start' });
142+
}
143+
// end edit by joerick
129144
};
130145

131146
nav.reset = function () {

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ nav:
2727
- faq.md
2828
- cpp_standards.md
2929
- Reference:
30-
- platforms.md
31-
- configuration.md
3230
- options.md
31+
- configuration.md
32+
- platforms.md
3333
- working-examples.md
3434
- About:
3535
- contributing.md

0 commit comments

Comments
 (0)