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

MAINT: various fixes to print CSS. #1770

Merged
merged 3 commits into from
May 8, 2024
Merged

Conversation

Carreau
Copy link
Collaborator

@Carreau Carreau commented Apr 15, 2024

This should among other fix #1745

When printing this hides
- The pydata navbar
- The announcement banner.
- The "skip to main content" link.
- The location breadcrumbs (in bd-header-article), without also hiding
the container the full content is shifted by a dozen pixel hight and
the end of the content get hidden behind the footer when printing.
- The prev.next buttons a bottom of page.

This does not hide the version warning banner as this is currently being
worked on in another PR.

I went the route of adding the bootstrap d-print-none, instead of
adding custom css rules, I'm happy to do the opposite, but it seem the
using bootstrap classes as that seems what is done in other places.

I've also added a break-inside avoid in a few places, mostly to try-to
avoid page breaks in the middle of codeblocks.

Copy link
Collaborator

@gabalafou gabalafou left a comment

Choose a reason for hiding this comment

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

The code diff looks good to me but there are a lot of failing CI checks

@drammock
Copy link
Collaborator

hmm the defusedxml errors should have been fixed by #1751 ... Oh I see, there's been a sphinx release so now all test runners need it, not just the one running sphinx dev

I'll open another PR to fix that

@trallard trallard added the tag: CSS CSS and SCSS related issues label Apr 18, 2024
This should among other fix pydata#1745

When printing this hides
 - The pydata navbar
 - The announcement banner.
 - The "skip to main content" link.
 - The location breadcrumbs (in bd-header-article), without also hiding
   the container the full content is shifted by a dozen pixel hight and
   the end of the content get hidden behind the footer when printing.
 - The prev.next buttons a bottom of page.

This does not hide the version warning banner as this is currently being
worked on in another PR.

I went the route of adding the bootstrat `d-print-none`, instead of
adding custom css rules, I'm happy to do the opposite, but it seem the
using bootstrap classes as that seems what is done in other places.

I've also added a  break-inside avoid in a few places, mostly to try-to
avoid page breaks in the middle of codeblocks.
@trallard
Copy link
Collaborator

trallard commented May 7, 2024

Merged main to resolve some conflicts.
@gabalafou, since you have already reviewed it, feel free to merge the PR once the CI is completed.

@Carreau
Copy link
Collaborator Author

Carreau commented May 13, 2024

Thanks !

ivanov pushed a commit to ivanov/pydata-sphinx-theme that referenced this pull request Jun 5, 2024
Co-authored-by: Tania Allard <taniar.allard@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag: CSS CSS and SCSS related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

text lines at the bottom are covered by 'skip to main content' while print a page
4 participants