diff --git a/src/textual/widgets/_selection_list.py b/src/textual/widgets/_selection_list.py index a448c5e412..f8dece7142 100644 --- a/src/textual/widgets/_selection_list.py +++ b/src/textual/widgets/_selection_list.py @@ -97,15 +97,15 @@ class SelectionList(Generic[SelectionType], OptionList): height: auto; } - .-light-mode SelectionList:focus > .selection-list--button-selected { + SelectionList:light:focus > .selection-list--button-selected { color: $primary; } - .-light-mode SelectionList > .selection-list--button-selected-highlighted { + SelectionList:light > .selection-list--button-selected-highlighted { color: $primary; } - .-light-mode SelectionList:focus > .selection-list--button-selected-highlighted { + SelectionList:light:focus > .selection-list--button-selected-highlighted { color: $primary; } diff --git a/src/textual/widgets/_toggle_button.py b/src/textual/widgets/_toggle_button.py index 4c29c236ae..90828c7ac1 100644 --- a/src/textual/widgets/_toggle_button.py +++ b/src/textual/widgets/_toggle_button.py @@ -94,16 +94,16 @@ class ToggleButton(Static, can_focus=True): /* Light mode overrides. */ - App.-light-mode ToggleButton > .toggle--button { + ToggleButton:light > .toggle--button { color: $background; background: $foreground 10%; } - App.-light-mode ToggleButton:focus > .toggle--button { + ToggleButton:light:focus > .toggle--button { background: $foreground 25%; } - App.-light-mode ToggleButton.-on > .toggle--button { + ToggleButton:light.-on > .toggle--button { color: $primary; } """ # TODO: https://github.com/Textualize/textual/issues/1780