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

Make invocation loc.body() default to all columns and rows #79

Merged
merged 14 commits into from
Dec 12, 2023

Conversation

rich-iannone
Copy link
Member

When adding styles through the tab_style() method, it is far more sensible target the most number of cells and use the columns and rows arguments to constrain the cell selection. This PR enables this behavior so that this

import great_tables as gt
from great_tables import style, loc, md, html
from great_tables import exibble

(
    gt.GT(exibble)
    .tab_style(
        style=style.text(color="red"),
        locations=loc.body(),
    )
)

results in
tab-style-default-everything

Fixes: #76

@rich-iannone rich-iannone marked this pull request as ready for review December 12, 2023 03:14
@rich-iannone rich-iannone requested a review from machow December 12, 2023 03:14
@rich-iannone rich-iannone marked this pull request as draft December 12, 2023 16:02
great_tables/_locations.py Outdated Show resolved Hide resolved
@rich-iannone rich-iannone merged commit f5b3105 into main Dec 12, 2023
6 checks passed
@rich-iannone rich-iannone deleted the cells-body-none-loc branch December 12, 2023 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure that columns and rows SelectExpr has default that targets all columns and rows
2 participants