Static wrapping to smaller width in Container width: auto #1450
-
Something changed in version from textual.app import App, ComposeResult
from textual.containers import Container
from textual.widgets import Button, Static
class Test(App):
CSS = """
Container {
width: auto;
}
"""
def compose(self) -> ComposeResult:
yield Container(Static("A wider static widget."), Button("button"))
Test().run() Up to and including version |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The was a change to the auto width calculations, but this is the expected behaviour. If you want the static to not wrap, you can set its width to fit (i.e. |
Beta Was this translation helpful? Give feedback.
The was a change to the auto width calculations, but this is the expected behaviour. If you want the static to not wrap, you can set its width to fit (i.e.
width: auto
).