As a newcomer to streamlit, I am experimenting with creating an application that incorporates multiple tag objects. By default, the tags are displayed in red, but I would like to customize the colors for each tag based on its category. For example, I want tags related to platforms to be shown in blue and tags related to amounts in purple.
https://i.stack.imgur.com/3llxf.png
I attempted to use a style.css file and import it into my main file, but the styles don't seem to be applied correctly.
div.element-container css-3u772n e1tzin5v2 {
background-color : #50C878;
}
with open('style.css') as f:
st.markdown(f'<style>{f.read()}</style>', unsafe_allow_html=True)
col7, col8= st.columns([2.5, 2.5])
with col7:
platform = st_tags(
value= ["Carousell"],
maxtags=3,
suggestions=["Carousell"],
label="Platform",
)
If you could provide some advice on effectively working with CSS styles, I would greatly appreciate it.