Working towards aligning radioset/togglebutton/selectionlist styles

This commit is contained in:
Darren Burns
2024-11-13 17:39:10 +00:00
parent 1ca098c69c
commit 2db9fbb1c6
2 changed files with 5 additions and 37 deletions

View File

@@ -117,25 +117,6 @@ class SelectionList(Generic[SelectionType], OptionList):
background: $panel;
}
&:light {
& > .selection-list--button {
color: $surface-darken-1;
}
& > .selection-list--button-selected-highlighted {
color: $success;
}
&:focus {
& > .selection-list--button-selected {
color: $success-darken-1;
}
& > .selection-list--button-selected-highlighted {
color: $success-darken-1;
}
}
}
&:focus {
& > .selection-list--button {
background: $panel-lighten-1;

View File

@@ -60,7 +60,7 @@ class ToggleButton(Static, can_focus=True):
background: $surface;
& > .toggle--button {
color: $surface-darken-1;
color: red;
background: $panel;
}
@@ -80,6 +80,10 @@ class ToggleButton(Static, can_focus=True):
& > .toggle--button {
background: $panel-lighten-1;
}
&.-on > .toggle--button {
background: $panel-lighten-1;
}
&:hover {
& > .toggle--label {
background: $block-cursor-background;
@@ -107,23 +111,6 @@ class ToggleButton(Static, can_focus=True):
background: $foreground 25%;
}
/* Light theme overrides. */
ToggleButton:light {
color: $text;
& > .toggle--button {
color: $background;
background: $foreground 10%;
}
&:focus > .toggle--button {
background: $foreground 25%;
}
&.-on > .toggle--button {
color: $success;
}
&.-on:focus > .toggle--button {
color: $success-darken-1;
}
}
""" # TODO: https://github.com/Textualize/textual/issues/1780
BUTTON_LEFT: str = ""