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

[For Docs] Documentation does not show when component classes use pseudo selectors by default. #3429

Closed
1dancook opened this issue Sep 29, 2023 · 3 comments

Comments

@1dancook
Copy link
Contributor

This is a follow up issue to an issue discussed and resolved on discord.

A quick summary:

  • CustomTable > .datatable--even-row {background: red} was not effecting a background change.

  • The newly added :dark pseudo-selector had to be used: CustomTable:dark > .datatable--even-row {background: red}


The Issue: Documentation does not show this.

In the documentation (at least for DataTable) there is the COMPONENT CLASSES section. But there is no mention on the page about a :dark pseudo selector.

From only reading the documentation, someone would interpret that the selector .datatable--even-row would be sufficient for changing the color. This is not the case.

In reality, there could be other things affecting the default use of component classes.


Suggestion:

In the DataTable COMPONENT CLASSES section there is a table of descriptions. Maybe a change like this is good:

#old:
datatable--even-row    Target even rows (row indices start at 0).

#changed:
datatable--even-row    Target even rows (row indices start at 0). :dark pseudo-selector is used by default.
# or, ":dark pseudo-selector is applied"
# or, ":dark pseudo-selector is required"

I suspect there are other widgets that have the same issue.

@github-actions
Copy link

We found the following entry in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

@willmcgugan
Copy link
Collaborator

This is a more general issue where the default css isn't displayed in the docs. We should pull that out in to the docs.

Closing, but we will address that soon.

Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants