-
Notifications
You must be signed in to change notification settings - Fork 815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a percentage to the border definition to apply an alpha #1863
Labels
Comments
Just to make sure, you can mute the border a little if you bake the alpha value into the colour itself, right? |
Yeah, you can set a color with alpha. But you apply new alpha to that color. |
davep
added a commit
to davep/textual
that referenced
this issue
Mar 6, 2023
willmcgugan
pushed a commit
that referenced
this issue
Mar 7, 2023
* Allow setting an additional alpha on a border See #1863. * Update the ChangeLog * Add snapshot tests for the border alpha value * Extend the border snapshot tests While this doesn't test *every* permutation, it covers enough bases that if something were to change it should catch it. * Tweak a typo in the border style examples * Add border transparency percentage to the border docs * Add a CSS example for using border transparency * Add Color.multiply_alpha * Update the CHANGELOG * Multiply the alpha on a colour rather than replace it As requested in #1954 (review) (actually required while talking in person with Will, but noted in the above) * Multiply the alpha on a border colour rather than replace it As requested in #1954 (review) (actually requested while talking in person with Will, but noted in the above)
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's often a requirement to set a border that is muted a little, but there is no easy way of applying an alpha to a border if it is not already set.
I think we should add an optional percentage to the border definition, to multiple the borders alpha. Something like the following:
The text was updated successfully, but these errors were encountered: