Skip to content

Commit

Permalink
fix: Prevent layout shift caused by scrollbars
Browse files Browse the repository at this point in the history
More info here: streamlit/streamlit#8504
  • Loading branch information
gabrieltempass committed Apr 15, 2024
1 parent 1a59ba4 commit bc25c47
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions streamlit_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
options=options,
)

# Prevent layout shift caused by scrollbars
# https://github.com/streamlit/streamlit/issues/8504

html = (
"""
<style>
Expand All @@ -51,6 +54,9 @@
div[data-testid="stToolbar"] {
visibility: hidden;
}
section.main {
overflow-y: scroll;
}
footer {
visibility: hidden;
}
Expand Down

0 comments on commit bc25c47

Please sign in to comment.