Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [BUG] - Styleable Container does not work in Bottom Container #243

Open
christopherwerner opened this issue Aug 8, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@christopherwerner
Copy link

Description

Using the [Bottom Container] (https://arnaudmiribel.github.io/streamlit-extras/extras/bottom_container/) to move a Styleable Container to the bottom of the view port disables the styling.

In the code below, the button at the bottom has no style, but the one at the top does - both are using the same stylable_container code.

Reproduction steps

import streamlit as st
from streamlit_extras.bottom_container import bottom
from streamlit_extras.stylable_container import stylable_container

with stylable_container(
        key="test_button1",
        css_styles="""
        
        button {
            background-color: white;
            border: none;
            color: blue;
        }
        """,
):
    with bottom():
        st.button("Styled Container FAILS it bottom")

with stylable_container(
        key="test_button2",
        css_styles="""
        
        button {
            background-color: white;
            border: none;
            color: blue;
        }
        """,
):
    st.button("Styled Container WORKS without bottom")

Screenshots

![DESCRIPTION](LINK.png)

Logs

No response

Version of streamlit

1.37

Version of streamlit-extras

0.4.3

@christopherwerner christopherwerner added the bug Something isn't working label Aug 8, 2024
@arnaudmiribel
Copy link
Owner

Hey @christopherwerner, does it also not work if you do it the other way, i.e.:

with bottom():
    with stylable_container(...):
        st.button("Test")

Pinging @lukasmasuch since he might know best about the internals of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants