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

[docs-infra] Fix truncated TOCs scrollbar #37770

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/pages/experiments/docs/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tags: ['Company']

### Image

<img alt="Satellite image of Tenerife" src="/static/blog/2022-tenerife-retreat/tenerife.jpeg" style="aspect-ratio: 4/3;" loading="lazy" />
<img alt="Satellite image of Tenerife" src="/static/blog/2022-tenerife-retreat/tenerife.jpeg" width="2560" height="1920" loading="lazy" />
Copy link
Member Author

@oliviertassinari oliviertassinari Jul 1, 2023

Choose a reason for hiding this comment

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

Not related to the other changes, but a quick win. This page is supposed to be the standard reference, here is the standard reference to how to include images, but this was outdated. Using the real width and height fixes the layout shift.


<p class="blog-description">An image description <a href="https://en.wikipedia.org/wiki/Tenerife">with a link</a>.</p>

Expand Down
6 changes: 3 additions & 3 deletions docs/src/modules/components/AppTableOfContents.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import TableOfContentsBanner from 'docs/src/components/banner/TableOfContentsBan
import featureToggle from 'docs/src/featureToggle';

const Nav = styled('nav')(({ theme }) => ({
top: 0,
top: 'var(--MuiDocs-header-height)',
paddingLeft: 2, // Fix truncated focus outline style
position: 'sticky',
height: '100vh',
height: 'calc(100vh - var(--MuiDocs-header-height))',
overflowY: 'auto',
paddingTop: `calc(var(--MuiDocs-header-height) + ${theme.spacing(4)})`,
paddingTop: theme.spacing(4),
paddingBottom: theme.spacing(4),
paddingRight: theme.spacing(4), // We can't use `padding` as stylis-plugin-rtl doesn't swap it
display: 'none',
Expand Down