Skip to content

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

@ewels

Description

@ewels

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions