Skip to content

Commit

Permalink
trial to fix modal width on mobile screen
Browse files Browse the repository at this point in the history
  • Loading branch information
EleoXDA committed Jun 21, 2023
1 parent 2c5787f commit 81bbe10
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ function adjustColumnWidth() {
column.style.flex = '0 0 100%';
column.style.maxWidth = '720px';
modalContent.style.flex = '0 0 90%';
modalContent.style.maxWidth = '720px';
modalContent.style.maxWidth = '620px';
} else {
const percentage = 720 /*width below 768px*/ + (viewportWidth - 768) * 130 /*900-720*/ / 232 /*1000-768*/;
column.style.flex = '0 0 ' + percentage + 'px';
column.style.maxWidth = percentage + 'px';
modalContent.style.flex = '0 0 ' + percentage - 100 + 'px';
modalContent.style.maxWidth = percentage - 100 + 'px';
const width = 720 /*width below 768px*/ + (viewportWidth - 768) * 130 /*900-720*/ / 232 /*1000-768*/;
column.style.flex = '0 0 ' + width + 'px';
column.style.maxWidth = width + 'px';
modalContent.style.flex = '0 0 ' + width - 100 + 'px';
modalContent.style.maxWidth = width - 100 + 'px';
}
});
}
Expand Down

0 comments on commit 81bbe10

Please sign in to comment.