Replies: 2 comments 4 replies
-
In the meantime, you can try adding this to your CSS: FocusButton {
&.-style-default {
/* Your CSS here... */
} |
Beta Was this translation helpful? Give feedback.
-
If you use A solution is to not inherit the CSS, and simply copy it: class MyButton(Button, inherit_css=False):
DEFAULT_CSS = """
# Copy of Button CSS
"""
... Or copy the entire Button class to your code. Ultimately Textual doesn't guarantee that the CSS of the default widgets won't change. If you don't want to use the above technique, you might want to write a snapshot test so you can catch any potential changes. And keep an eye on Textual's release notes. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Consider the following code:
With 6.0.0 this worked perfectly fine, but with 6.1.0 the
hover
style does not work: thebackground
is completely ignored and theborder
is strangely not applied to the top.Is this a regression and I should file an issue, or is it a desired change in behaviour and I'll have to adjust my code? If the latter, how?
Thanks in advance for any insights!
Beta Was this translation helpful? Give feedback.
All reactions