Skip to content

Commit

Permalink
Merge pull request #203 from arnaudmiribel/fix/vertical-alignment-issue
Browse files Browse the repository at this point in the history
Fix issue with vertical alignment for grid
  • Loading branch information
arnaudmiribel authored Dec 11, 2023
2 parents 5eb54a7 + f283450 commit 5db3c30
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "streamlit-extras"
version = "0.3.5"
version = "0.3.6"
license = "Apache-2.0"
description = "A library to discover, try, install and share Streamlit extras"
authors = [
Expand Down
11 changes: 11 additions & 0 deletions src/streamlit_extras/grid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,20 @@ def grid(
key=f"grid_{vertical_align}",
css_styles=[
"""
div[data-testid="column"] > div[data-testid="stVerticalBlockBorderWrapper"] > div {
height: 100%;
}
""",
"""
div[data-testid="column"] > div {
height: 100%;
}
""",
f"""
div[data-testid="column"] > div[data-testid="stVerticalBlockBorderWrapper"] > div > div[data-testid="stVerticalBlock"] > div.element-container {{
{"margin-top: auto;" if vertical_align in ["center", "bottom"] else ""}
{"margin-bottom: auto;" if vertical_align == "center" else ""}
}}
""",
f"""
div[data-testid="column"] > div > div[data-testid="stVerticalBlock"] > div.element-container {{
Expand Down

0 comments on commit 5db3c30

Please sign in to comment.