Skip to content

Commit 26d8b83

Browse files
committed
style tweak
1 parent 44129f0 commit 26d8b83

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

src/textual/widgets/_button.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ class Button(Widget, can_focus=True):
6262
background: $surface;
6363
border: block $surface;
6464
&:hover {
65-
opacity: 90%;
65+
background: $primary;
66+
border: block $primary;
6667
}
6768
&:focus {
6869
text-style: $button-focus-text-style;
@@ -72,22 +73,41 @@ class Button(Widget, can_focus=True):
7273
border: block $surface;
7374
tint: $background 30%;
7475
}
76+
&:disabled {
77+
color: auto 50%;
78+
}
7579
7680
&.-primary {
7781
background: $primary-muted;
7882
border: block $primary-muted;
83+
&:hover {
84+
background: $primary;
85+
border: block $primary;
86+
}
7987
}
8088
&.-success {
8189
background: $success-muted;
8290
border: block $success-muted;
91+
&:hover {
92+
background: $success;
93+
border: block $success;
94+
}
8395
}
8496
&.-warning {
8597
background: $warning-muted;
8698
border: block $warning-muted;
99+
&:hover {
100+
background: $warning;
101+
border: block $warning;
102+
}
87103
}
88104
&.-error {
89105
background: $error-muted;
90106
border: block $error-muted;
107+
&:hover {
108+
background: $error;
109+
border: block $error;
110+
}
91111
}
92112
}
93113
&.-style-default {
@@ -104,7 +124,7 @@ class Button(Widget, can_focus=True):
104124
}
105125
106126
&:disabled {
107-
text-opacity: 0.4;
127+
text-opacity: 0.6;
108128
}
109129
110130
&:focus {

0 commit comments

Comments
 (0)