Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Button gets full width if it has a help/tooltip #10656

@JosephMarinier

Description

@JosephMarinier

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

A button gets full width if it has a help/tooltip defined.

Reproducible Code Example

Open in Streamlit Cloud

import streamlit as st

st.button("A")  # Has expected width.

st.button("B", help="tooltip")  # Has unexpected 100% width.

Steps To Reproduce

Try the above code example.

Expected Behavior

Button B should have width: auto, just like button A.

Current Behavior

Button B has width: 100%.

Image

Is this a regression?

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

Debug info

  • Streamlit version: 1.43.0
  • Python version: 3.11.9
  • Operating System: MacOS
  • Browser: Chrome

Additional Information

This is a regression from 1.43.0. It used to work as expected in 1.42.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P1High priority - fix within two weeksstatus:confirmedBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedtype:regressionThis bug is a regression from previous behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions