Skip to content

Placeholder width can't be set to auto #1508

@rodrigogiraoserrao

Description

@rodrigogiraoserrao

Because of the (convoluted 🤪) way in which I implemented Placeholder, turns out you can't set its width to auto, otherwise the placeholder collapses.

E.g., if you run the app below, you will have an empty screen:

from textual.app import App
from textual.widgets import Placeholder

class MyApp(App):
    CSS = """
    Placeholder { width: auto; }
    """

    def compose(self):
        yield Placeholder()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions