Textualize/rich

[REQUEST] Doc: improve/create documentation for default styles

sbraz opened this issue · 2 comments

Have you checked the issues for a similar suggestions? → Yes

How would you improve Rich?

Hi,
I would like the documentation to mention all values from rich/default_styles.py. I'll explain why below.

What problem does it solve for you?

While I was playing with progress bars, I found out that "[progress.percentage]{task.percentage:>3.0f}%" is the default format for rich.progress.TaskProgressColumn objects. However, I couldn't easily find where progress.percentage was defined. https://rich.readthedocs.io/en/stable/search.html?q=%22progress.percentage%22&check_keywords=yes&area=default didn't output anything useful.

It was only when I grepped the code that I found its definition here:

"progress.percentage": Style(color="magenta"),

Since the various default styles are used in the example code and the documentation, it would be nice to document them.

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

I just noticed that the doc mentions python -m rich.default_styles:

python -m rich.default_styles

However, adding the list below the command would still make it easier in my opinion.