Does TCSS support the calc() function or a similar approach? #6004
-
I hope to achieve it in a similar way as follows: $customheight: 10;
.title {
width: auto;
height: calc($customheight - 2);
} |
Beta Was this translation helpful? Give feedback.
Answered by
edward-jazzhands
Jul 30, 2025
Replies: 1 comment 1 reply
-
No unfortuantely the calc() function is not supported. If you want to calculate width with code you have to do it with Python in your Textual app. See here: https://textual.textualize.io/styles/width/#python |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
willmcgugan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No unfortuantely the calc() function is not supported. If you want to calculate width with code you have to do it with Python in your Textual app. See here: https://textual.textualize.io/styles/width/#python