Skip to content

The shorter tab vertical spacing is filled to match the length of the other tab. #181

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
brtnfld opened this issue Apr 14, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@brtnfld
Copy link

brtnfld commented Apr 14, 2025

When using the tabs feature, if one tab contains more lines than another, the shorter tab will be padded with blank lines until it matches the number of lines in the longer tab. If the padding extends beyond the current page, this can lead to wasted space and may create the impression that the documentation ends prematurely.

@jothepro
Copy link
Owner

I understand that this might be an issue in some cases! Do you have a suggestion on how this could be improved?
The decision to make every page on a tab view the same length was made to avoid the content underneath it jumping around, which I found quite distracting. Maybe this could be a configuration option in the CSS?

@jothepro jothepro added the enhancement New feature or request label Apr 16, 2025
@brtnfld
Copy link
Author

brtnfld commented Apr 17, 2025

I'm not a CSS expert, but it would be sufficient to do it with CSS if that were an option. We use tabs for different versions of an example code for our use cases. The source code in tab 1 is much shorter than tab 2, so I would rather the text start directly after the text of tab 1, and it expands to the end of tab 2, the "jumping around" would not be noticeable because it would be off-screen until one scrolls down. But I don't mind the jumping around since the text changes once you switch tabs, so I expect it. You can find an example at

https://hdfgroup.github.io/hdf5/develop/d7/d7a/_h5_t__u_g.html#subsec_datatype_complex

It's the second instance of the tab usage ( you can search for "2003" to find it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants