mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Working towards aligning radioset/togglebutton/selectionlist styles
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 = "▐"
|
||||
|
||||
Reference in New Issue
Block a user