mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Improve text-align example.
Replace statics with labels; change to a 2 x 2 grid layout to make it easier to see the difference between 'center' and 'justify'; increase readability by setting 'color: auto' in the labels.
This commit is contained in:
@@ -1,24 +1,29 @@
|
||||
#one {
|
||||
text-align: left;
|
||||
background: lightblue;
|
||||
|
||||
text-align: left;
|
||||
background: lightblue;
|
||||
}
|
||||
|
||||
#two {
|
||||
text-align: center;
|
||||
background: indianred;
|
||||
text-align: center;
|
||||
background: indianred;
|
||||
}
|
||||
|
||||
#three {
|
||||
text-align: right;
|
||||
background: palegreen;
|
||||
text-align: right;
|
||||
background: palegreen;
|
||||
}
|
||||
|
||||
#four {
|
||||
text-align: justify;
|
||||
background: palevioletred;
|
||||
text-align: justify;
|
||||
background: palevioletred;
|
||||
}
|
||||
|
||||
Static {
|
||||
padding: 1;
|
||||
Label {
|
||||
padding: 1 2;
|
||||
height: 100%;
|
||||
color: auto;
|
||||
}
|
||||
|
||||
Grid {
|
||||
grid-size: 2 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user