Skip to content

Commit

Permalink
Tree styling consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Oct 9, 2024
1 parent 8e895f3 commit 15b7574
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions src/textual/widgets/_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,38 +581,44 @@ class Tree(Generic[TreeDataType], ScrollView, can_focus=True):

DEFAULT_CSS = """
Tree {
background: $panel;
background: $surface;
color: $text;
& > .tree--label {
}
& > .tree--guides {
color: $success-darken-3;
text-style: bold;
color: $surface-lighten-1;
}
& > .tree--guides-hover {
color: $success;
text-style: bold;
color: $surface-lighten-1;
}
& > .tree--guides-selected {
color: $warning;
text-style: bold;
color: $surface-lighten-1;
}
& > .tree--cursor {
background: $secondary-darken-2;
background: $highlight-cursor-blurred;
color: $text;
text-style: bold;
}
&:focus > .tree--cursor {
background: $secondary;
}
& > .tree--highlight {
text-style: underline;
}
& > .tree--highlight-line {
background: $boost;
}
&:focus {
& > .tree--cursor {
background: $highlight-cursor;
}
& > .tree--guides-hover {
color: $surface-lighten-2;
}
& > .tree--guides-selected {
color: $surface-lighten-2;
}
}
&.-ansi {
background: ansi_default;
color: ansi_default;
Expand Down

0 comments on commit 15b7574

Please sign in to comment.