diff --git a/src/textual/widgets/_selection_list.py b/src/textual/widgets/_selection_list.py index efbf8687de..9f75f8360a 100644 --- a/src/textual/widgets/_selection_list.py +++ b/src/textual/widgets/_selection_list.py @@ -98,12 +98,12 @@ class SelectionList(Generic[SelectionType], OptionList): height: auto; & > .selection-list--button { - color: $surface; + color: $surface-darken-1; background: $panel; } & > .selection-list--button-highlighted { - color: $surface; + color: $surface-darken-1; background: $panel; } diff --git a/src/textual/widgets/_toggle_button.py b/src/textual/widgets/_toggle_button.py index 68ec3dbb97..95727e5698 100644 --- a/src/textual/widgets/_toggle_button.py +++ b/src/textual/widgets/_toggle_button.py @@ -60,7 +60,13 @@ class ToggleButton(Static, can_focus=True): background: $surface; & > .toggle--button { - color: $surface; + color: $surface-darken-1; + background: $panel; + } + + &.-on > .toggle--button { + color: $success; + background: $panel; } &:focus { @@ -72,7 +78,7 @@ class ToggleButton(Static, can_focus=True): text-style: $block-cursor-text-style; } & > .toggle--button { - background: $foreground 25%; + background: $panel-lighten-1; } &:hover { & > .toggle--label { @@ -85,16 +91,10 @@ class ToggleButton(Static, can_focus=True): & > .toggle--label { background: $block-hover-background; } - & > .toggle--button { - background: $foreground 25%; - } } } - - - /* Base button colors (including in dark themes). */ ToggleButton > .toggle--button { @@ -102,9 +102,6 @@ class ToggleButton(Static, can_focus=True): background: $foreground 15%; } - ToggleButton.-on > .toggle--button { - color: $success; - } ToggleButton.-on:focus > .toggle--button { background: $foreground 25%;