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

Fix TOC max height size #9035

Merged
merged 2 commits into from
Aug 3, 2023
Merged

Fix TOC max height size #9035

merged 2 commits into from
Aug 3, 2023

Conversation

MihkelAuv
Copy link
Contributor

Max height of toc-offcanvas is calculated by only subtracting header height from viewport size:

>.toc-offcanvas {
flex: .35;
display: block;
overflow-x: hidden;
overflow-y: auto;
max-width: 360px;
max-height: calc(100vh - #{$header-height});

This causes a portion of TOC to expand out of the viewport if main part of the page isn't scrolled all the way down:
image

Proposed solution is to also subtract main elements top padding size from viewport height:
image

@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01% ⚠️

Comparison is base (cf2d134) 77.56% compared to head (c3f9bb7) 77.56%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9035      +/-   ##
==========================================
- Coverage   77.56%   77.56%   -0.01%     
==========================================
  Files         591      591              
  Lines       24577    24577              
==========================================
- Hits        19064    19063       -1     
- Misses       5513     5514       +1     

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yufeih
Copy link
Contributor

yufeih commented Aug 3, 2023

Thank you @MihkelAuv

@yufeih yufeih merged commit dbdb075 into dotnet:main Aug 3, 2023
@yufeih yufeih added the bug-fix Makes the pull request to appear in "Bug Fixes" section of the next release note label Aug 3, 2023
@MihkelAuv MihkelAuv deleted the fix-toc-height branch August 4, 2023 04:36
p-kostov pushed a commit to ErpNetDocs/docfx that referenced this pull request Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix Makes the pull request to appear in "Bug Fixes" section of the next release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants