Skip to content

Commit efda73c

Browse files
Sean PrashadSean Prashad
authored andcommitted
Fix layout "jump" when switching between tabs
On the "Question List" tab, the content will "jump" a few pixels to the left due to the content exceeding the page height (ie. it has a lot of rows, which our table does). As a result, we need to account for this by calculating the left and right margin when the user switches to the respective tab, whether the scroll bar is present or not. See https://stackoverflow.com/questions/9341465/prevent-a-centered-layout-from-shifting-its-position-when-scrollbar-appears#answer-42987298
1 parent f018370 commit efda73c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/styles.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,700');
22

33
.App {
4-
margin: 0;
4+
margin-left: calc(100vw - 100%);
5+
margin-right: 0;
56

67
font-family: 'Open Sans', sans-serif;
78
-webkit-font-smoothing: antialiased !important;

0 commit comments

Comments
 (0)