Skip to content
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

[REQUEST] Table row style should overwrite table style #1129

Closed
ewels opened this issue Mar 23, 2021 · 2 comments
Closed

[REQUEST] Table row style should overwrite table style #1129

ewels opened this issue Mar 23, 2021 · 2 comments

Comments

@ewels
Copy link
Contributor

ewels commented Mar 23, 2021

Describe the bug
When making a table, setting the style on a row does nothing if it's been set on the table.

Setting colours in-line with colour strings does work as expected.

To Reproduce

from rich.table import Table
from rich import print

table = Table(style="green")
table.add_column("RESULTS SUMMARY")
table.add_row("[✔] 3 Tests Passed", style="green")
table.add_row("[1] 5 Test Warnings", style="yellow")
table.add_row("[✗] 9 Tests Failed", style="red")
print(table)

table = Table(style="green")
table.add_column("RESULTS SUMMARY")
table.add_row("[green][✔] 3 Tests Passed")
table.add_row("[yellow][1] 5 Test Warnings")
table.add_row("[red][✗] 9 Tests Failed")
print(table)

@willmcgugan
Copy link
Collaborator

Should be fixed in v10.0.0

@ewels
Copy link
Contributor Author

ewels commented Mar 27, 2021

Fantastic, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants