create a button with zero visible padding #2633
davetapley
started this conversation in
General
Replies: 1 comment
-
I agree that this note in the Button docs is a little misleading. The default CSS for the https://github.com/Textualize/textual/blob/main/src/textual/widgets/_button.py#L29-L36 So to create a button with zero visible padding you would actually also need to change these values. from textual.app import App, ComposeResult
from textual.widgets import Button
class ButtonApp(App):
CSS = """
Button {
margin-bottom: 1;
}
#none {
border: none;
}
#link {
border: none;
height: 1;
min-width: 0;
}
"""
def compose(self) -> ComposeResult:
yield Button("Default Button")
yield Button("Border none", id="none")
yield Button("What I wanted", id="link")
if __name__ == "__main__":
app = ButtonApp()
app.run() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I found this a bit confusing:
Because:

Stale docs or as designed?
Beta Was this translation helpful? Give feedback.
All reactions