Skip to content

Commit

Permalink
fix: markdown overflows page on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
iisakkirotko committed Sep 6, 2024
1 parent 62cd39b commit 05f0185
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion solara/website/components/breadcrumbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def BreadCrumbs(route_current: solara.Route):
routes: List[solara.Route] = _resolve_path_to_route(current_path_parts[1:], router.routes, [])
print("Found routes", [r.path for r in routes])

with solara.Row(style={"align-items": "center"}) as main:
with solara.Row(style={"align-items": "center", "flex-wrap": "wrap"}) as main:
for i, route in enumerate(routes):
if i == len(routes) - 1:
solara.Text(route.label, style={"color": "var(--color-text-fade)"})
Expand Down
2 changes: 1 addition & 1 deletion solara/website/components/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ def CategoryLayout(children=[]):
if route_current.path == "/":
return Gallery()
else:
with solara.Column(align="stretch", children=children) as main:
with solara.Column(align="stretch", children=children, style={"max-width": "100%"}) as main:
pass
return main
2 changes: 1 addition & 1 deletion solara/website/components/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def MarkdownWithMetadata(content: str, unsafe_solara_execute=True):
with solara.v.Html(
tag="div", style_="display: flex; flex-direction: row; gap: 15px; max-width: 90%; margin: 0 auto;", attributes={"id": "markdown-to-navigate"}
):
solara.Markdown(content, unsafe_solara_execute=unsafe_solara_execute, style="flex-grow: 1;")
solara.Markdown(content, unsafe_solara_execute=unsafe_solara_execute, style="flex-grow: 1; max-width: 100%;")
MarkdownNavigation(id="markdown-to-navigate").key("markdown-nav" + str(hash(content)))


Expand Down

0 comments on commit 05f0185

Please sign in to comment.