Skip to content

Commit 3e363d4

Browse files
committed
Style tweak to toggle buttons
1 parent 17f5739 commit 3e363d4

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1818
- Added `grid_size` property to `GridLayout` https://github.com/Textualize/textual/pull/6210
1919
- Exposed `NoSelection` and `BLANK` via `textual.widgets.select` https://github.com/Textualize/textual/pull/6214
2020

21+
### Changed
22+
23+
- Change highlight style of Select to only highlight the border, not the label https://github.com/Textualize/textual/pull/6214
24+
2125
## [6.5.0] - 2025-10-31
2226

2327
### Added

src/textual/widgets/_toggle_button.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ class ToggleButton(Static, can_focus=True):
6464
&.-textual-compact {
6565
border: none !important;
6666
padding: 0;
67+
&:focus {
68+
border: tall $border;
69+
background-tint: $foreground 5%;
70+
& > .toggle--label {
71+
color: $block-cursor-foreground;
72+
background: $block-cursor-background;
73+
text-style: $block-cursor-text-style;
74+
}
75+
}
6776
}
6877
6978
& > .toggle--button {
@@ -80,9 +89,7 @@ class ToggleButton(Static, can_focus=True):
8089
border: tall $border;
8190
background-tint: $foreground 5%;
8291
& > .toggle--label {
83-
color: $block-cursor-foreground;
84-
background: $block-cursor-background;
85-
text-style: $block-cursor-text-style;
92+
color: $block-cursor-foreground;
8693
}
8794
}
8895
&:blur:hover {

0 commit comments

Comments
 (0)