-
Notifications
You must be signed in to change notification settings - Fork 12
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 document viewer sizing up to 200% zoom #886
Conversation
bfd87da
to
e573bd8
Compare
} | ||
|
||
.document-viewer-container { | ||
flex-grow: 1; | ||
overflow-y: auto; | ||
width: 32.5rem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to keep the paragraph width consistent in terms of characters per line, regardless of zoom / font size. There could be other approaches, but in any case the fixed aspect ratio wasn't working well.
@@ -21,8 +27,23 @@ | |||
align-self: stretch; | |||
} | |||
|
|||
.view-documents-nav .button-container > * { | |||
flex: 1 0 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes the buttons the same size, rather than fit-to-text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked out the branch and it all works nicely! Thanks for fixing that!
} | ||
|
||
.view-documents-nav .button-container .themed-button-wrapper { | ||
flex-grow: 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gives the buttons twice as much "extra space" as the page number text.
Description
Document viewer was not useable at higher zoom levels due to a fixed aspect ratio.
These changes address that, and also optimise spacing at higher zoom breakpoints.
Screenshots
110% Zoom (before first breakpoint)
150% Zoom (between first and second breakpoints)
200% Zoom (after second breakpoint)
Checklist
Have you done the following?
Linked the relevant Issueno issue, quick win