Skip to content

Commit bf43e2a

Browse files
committed
fix: resolve the sidebar chevron using correct svg
Signed-off-by: Akshay Mestry <[email protected]>
1 parent aa24775 commit bf43e2a

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

theme/internal/utils.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
Author: Akshay Mestry <[email protected]>
66
Created on: Friday, February 21 2025
7-
Last updated on: Monday, March 03 2025
7+
Last updated on: Saturday, March 08 2025
88
99
This module defines a collection of utility functions used for
1010
customising the SMART Sphinx Theme. These utilities focus on enhancing
@@ -89,8 +89,18 @@ def make_toc_collapsible(tree: bs4.BeautifulSoup) -> None:
8989
type="button",
9090
**{"@click.prevent.stop": "expanded = !expanded"},
9191
)
92-
i = tree.new_tag("i", attrs={"class": "fa-solid fa-circle-plus"})
93-
button.append(i)
92+
label = tree.new_tag("span", attrs={"class": "sr-only"})
93+
button.append(label)
94+
svg = bs4.BeautifulSoup(
95+
(
96+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 '
97+
'24" width="18px" height="18px" stroke="none" '
98+
'fill="currentColor"><path d="M10 6L8.59 7.41 13.17 12l-4.'
99+
'58 4.59L10 18l6-6z"/></svg>'
100+
),
101+
"html.parser",
102+
).svg
103+
button.append(svg) # type:ignore[arg-type]
94104
link.append(button)
95105

96106

0 commit comments

Comments
 (0)