carpentries / varnish

Template for pkgdown site
https://carpentries.github.io/varnish/
Other
7 stars 25 forks source link

Bugfix: .card-title text would wrap at high screen widths. #112

Closed Robadob closed 8 months ago

Robadob commented 9 months ago

Making this change inside chrome's dev tools fixes it, at the cost of limiting the font size when the side bar is collapsed (with the sidebar collapsed, on a 1440p monitor the font size would previously peak at 27.12px and not wrap)

It caps the font size to 25px, as the issue occurs at ~25.29px.

Before (27.12px) image

After (25px) image

Might be possible to instead dynamically apply the cap when the sidebar is expanded. But I'm far from a front-end web developer.

I'm not sure I understand why the font even scales with screen width, above 1350px screen width (with sidebar collapsed) or 1229px (with sidebar expanded), the box it's contained within has a static size. Furthermore, when screen width drops below 1200px, the sidebar is hidden so the box expands to follow screen width but the font size continues reducing.

Closes #111

zkamvar commented 9 months ago

Would you mind updating the NEWS item that attempted to fix this with your contribution?

Robadob commented 9 months ago

Would you mind updating the NEWS item that attempted to fix this with your contribution?

Sorted

zkamvar commented 8 months ago

Thank you!