Skip to content

Commit 659f40a

Browse files
committed
Tweak the styling to make the sidebar less greedy
By the looks of things, with #77, the issue is that there is a Vertical that is width auto, which contains a Tree that is width auto, and a label that is width 100%. The intention seems to be that the sidebar should be as wide as the tree is, and the tree should be as wide as its content needs; meanwhile the label should be the full width of its container. At some point recently it seems the balance in this setup has changed and the 100% label is making its auto-width container extra greedy. Given that there's no simple way of saying "be 100% of my parent but don't put pressure on its width calculation if it's width auto" this commit changes things so that the label itself is also width auto, and tries to ensure that the background looks like it did before. The fundamental fix for this probably needs to be in Textual's layout code, but this will fix Trogon itself in the meanwhile. Fixes #77.
1 parent a2d8874 commit 659f40a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

trogon/trogon.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@
4545

4646
#home-commands-label {
4747
color: $text;
48-
background: $background 50%;
49-
width: 100%;
48+
width: auto;
5049
height: 4;
5150
padding: 1 2;
5251
}
5352

5453
#home-sidebar {
54+
background: $background 50%;
5555
dock: left;
5656
width: auto;
5757
}

0 commit comments

Comments
 (0)