Skip to content

html repr: improve style for dropdown sections #10354

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

benbovy
Copy link
Member

@benbovy benbovy commented May 26, 2025

@max-sixty
Copy link
Collaborator

that's really nice! ❤️

@dcherian
Copy link
Contributor

Yes! Thank you!

@dcherian dcherian added topic-html-repr plan to merge Final call for comments labels May 27, 2025
@TomNicholas

This comment was marked as resolved.

@benbovy
Copy link
Member Author

benbovy commented May 28, 2025

Added a small glow effect for icons that are "active" (i.e. their corresponding dropdown section is displayed), which looks nicer especially in dark mode:

Screenshot 2025-05-28 at 10 18 11

Comment on lines +310 to +311
.xr-var-data > table > tbody > tr {
background-color: transparent !important;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a special case for dask's array repr so that it looks like this:

Screenshot 2025-05-28 at 10 27 33

instead of this:

Screenshot 2025-05-28 at 10 30 26

This trick may not work well for other wrapped arrays that have an html repr, though.

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

Successfully merging this pull request may close these issues.

expanded attrs makes HTML repr confusing to read
4 participants