textual/docs/examples/tutorial/stopwatch.tcss
2024-11-18 22:01:44 +00:00

52 lines
585 B
Text

Stopwatch {
layout: horizontal;
background: $boost;
height: 5;
min-width: 50;
margin: 1;
padding: 1;
}
TimeDisplay {
text-align: center;
color: $foreground-muted;
height: 3;
}
Button {
width: 16;
}
#start {
dock: left;
}
#stop {
dock: left;
display: none;
}
#reset {
dock: right;
}
.started {
background: $success-muted;
color: $text;
}
.started TimeDisplay {
color: $foreground;
}
.started #start {
display: none
}
.started #stop {
display: block
}
.started #reset {
visibility: hidden
}