Skip to content
Merged
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
7 changes: 5 additions & 2 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1691,14 +1691,17 @@ const styles = {
backgroundColor: themeColors.modalBackground,
},
PDFView: {
flex: 1,
// `display: grid` is not supported in native platforms!
// It's being used on Web/Desktop only to vertically center short PDFs,
// while preventing the overflow of the top of long PDF files.
display: 'grid',

@luacmartins luacmartins Apr 4, 2022

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should add a comment here to avoid setting a bad example. Something like:

`display: grid` is not supported in native platforms! It's being used on Web/Desktop only to vertically center short PDFs, while preventing the overflow of the top of long PDF files.

backgroundColor: themeColors.modalBackground,
width: '100%',
height: '100%',
flexDirection: 'row',
justifyContent: 'center',
overflow: 'hidden',
overflowY: 'auto',
alignItems: 'center',
},

modalCenterContentContainer: {
Expand Down