diff --git a/src/textual/theme.py b/src/textual/theme.py index 05820f5944..c6c44b80d7 100644 --- a/src/textual/theme.py +++ b/src/textual/theme.py @@ -99,7 +99,8 @@ def to_color_system(self) -> ColorSystem: variables={ "block-cursor-background": "#88C0D0", "block-cursor-foreground": "#2E3440", - "block-cursor-text-style": "bold", + "block-cursor-text-style": "none", + "footer-key-foreground": "#88C0D0", }, ), "gruvbox": Theme( @@ -115,6 +116,9 @@ def to_color_system(self) -> ColorSystem: surface="#3c3836", panel="#504945", dark=True, + variables={ + "block-cursor-foreground": "#fbf1c7", + }, ), "solarized-dark": Theme( name="solarized-dark", diff --git a/src/textual/widgets/_collapsible.py b/src/textual/widgets/_collapsible.py index 1db90f28fa..24911fae48 100644 --- a/src/textual/widgets/_collapsible.py +++ b/src/textual/widgets/_collapsible.py @@ -29,8 +29,8 @@ class CollapsibleTitle(Static, can_focus=True): } CollapsibleTitle:focus { - background: $secondary; - color: $text; + background: $block-cursor-background; + color: $block-cursor-foreground; } """ diff --git a/src/textual/widgets/_list_view.py b/src/textual/widgets/_list_view.py index 6d9bdac7a5..1bd3b0c834 100644 --- a/src/textual/widgets/_list_view.py +++ b/src/textual/widgets/_list_view.py @@ -29,7 +29,7 @@ class ListView(VerticalScroll, can_focus=True, can_focus_children=False): ListView { background: transparent; & > ListItem.--highlight { - color: $text; + color: $block-cursor-foreground; background: $block-cursor-blurred-background; } &:focus-within { diff --git a/src/textual/widgets/_option_list.py b/src/textual/widgets/_option_list.py index 626d5938d3..dc82b0fb52 100644 --- a/src/textual/widgets/_option_list.py +++ b/src/textual/widgets/_option_list.py @@ -144,25 +144,25 @@ class OptionList(ScrollView, can_focus=True): border: tall transparent; padding: 0 1; background: $surface; - &:focus { border: tall $border; background-tint: $foreground 5%; & > .option-list--option-highlighted { + color: $block-cursor-foreground; background: $block-cursor-background; - text-style: bold; + text-style: $block-cursor-text-style; } } & > .option-list--option-hover-highlighted { - background: $secondary; - color: $text; + color: $block-cursor-foreground; + background: $block-cursor-background; } & > .option-list--separator { color: $foreground 15%; } & > .option-list--option-highlighted { - color: $text; + color: $foreground; background: $block-cursor-blurred-background; } & > .option-list--option-disabled { diff --git a/src/textual/widgets/_radio_set.py b/src/textual/widgets/_radio_set.py index 8a508f935c..6da1c68b53 100644 --- a/src/textual/widgets/_radio_set.py +++ b/src/textual/widgets/_radio_set.py @@ -67,7 +67,7 @@ class RadioSet(VerticalScroll, can_focus=True, can_focus_children=False): & > RadioButton.-selected { color: $text; - text-style: bold; + text-style: $block-cursor-text-style; background: $block-cursor-background; & > .toggle--button { color: $surface; diff --git a/src/textual/widgets/_toggle_button.py b/src/textual/widgets/_toggle_button.py index 51f9c0e5ae..9efc35a228 100644 --- a/src/textual/widgets/_toggle_button.py +++ b/src/textual/widgets/_toggle_button.py @@ -69,7 +69,7 @@ class ToggleButton(Static, can_focus=True): & > .toggle--label { color: $text; background: $block-cursor-background; - text-style: bold; + text-style: $block-cursor-text-style; } & > .toggle--button { background: $foreground 25%; @@ -98,7 +98,7 @@ class ToggleButton(Static, can_focus=True): /* Base button colors (including in dark mode). */ ToggleButton > .toggle--button { - text-style: bold; + text-style: $block-cursor-text-style; background: $foreground 15%; } diff --git a/src/textual/widgets/_tree.py b/src/textual/widgets/_tree.py index 424f352510..637a8dace4 100644 --- a/src/textual/widgets/_tree.py +++ b/src/textual/widgets/_tree.py @@ -608,9 +608,9 @@ class Tree(Generic[TreeDataType], ScrollView, can_focus=True): &:focus { background-tint: $foreground 5%; & > .tree--cursor { - color: $text; + color: $block-cursor-foreground; background: $block-cursor-background; - text-style: bold; + text-style: $block-cursor-text-style; } & > .tree--guides { color: $surface-lighten-3;