-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Margin and fr
don't mix well
#2220
Comments
This seems to work as I would expect. A blank line, followed by the lines with text. What do you get? |
Don't mind me, I got the MRE mixed up. Real issue: setting margins in widgets inside a container doesn't mix well with also using The labels in the MRE below have 3 lines each. Each sets a margin to 1. What we get: Expected output:
Container {
height: 8;
background: pink;
}
#top {
background: red;
margin-top: 1;
height: 1fr;
}
#bot {
background: blue;
margin-bottom: 1;
height: 1fr;
}
from textual.app import App, ComposeResult
from textual.containers import Container
from textual.widgets import Label
class MyApp(App[None]):
CSS_PATH = "margin.css"
def compose(self) -> ComposeResult:
with Container():
yield Label("one\ntwo\nthree", id="top")
yield Label("four\nfive\nsix", id="bot") |
I have had all sorts of weird interactions with |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
Edit: original MRE was wrong.
See the real issue below
The text was updated successfully, but these errors were encountered: