Skip to content

Multiselect drop down background is inconsistent #11348

Description

@sfc-gh-dmatthews

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

If I use a theme with backgroundColor and secondaryBackgroundColor set for both the main body of the app and the sidebar, the color of the multiselect dropdown is inconsistent.

  • In the main body of the app, the dropdown background comes from theme.backgroundColor and the hover effect is a 15% alpha layer derived from theme.secondaryBackgroundColor.
  • In the sidebar, the dropdown background comes from theme.sidebar.secondaryBackgroundColor and the hover effect is a 15% alpha layer derived from theme.secondaryBackgroundColor.
Image Image

Reproducible Code Example

import streamlit as st

st.multiselect("Widgets", ["A", "B", "C"])
with st.sidebar:
    st.multiselect("Gizmos", ["A", "B", "C"])

Steps To Reproduce

[theme]
base="dark"
backgroundColor="#0e1117"
secondaryBackgroundColor="indigo"
codeBackgroundColor="darkslategrey"

[theme.sidebar]
backgroundColor="#262730"
secondaryBackgroundColor="darkgoldenrod"

Expected Behavior

With both the main body and sidebar having their own background color and secondary background color, I'd expect consistent application within those regions.

Note: There is currently an inversion between primary and secondary background color in the sidebar if they are not set separately and only inherited from the main body. I'm not commenting on that; I only mean to say if I do set values in [theme.sidebar] that I expect to them to apply in the sidebar like they do to the main body if set in [theme]

Current Behavior

No response

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.45.1
  • Python version: 3.13
  • Operating System: Mac
  • Browser: Prisma

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:themingRelated to themingpriority:P3Medium priority - worth fixing without urgencystatus:confirmedBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions