Fix layout shift

This commit is contained in:
Rafael 2022-03-18 09:04:09 -03:00 committed by Thomas Zarebczan
parent 36a63e27c1
commit 6d362b19c8
2 changed files with 22 additions and 7 deletions

View file

@ -105,17 +105,31 @@ body {
.main--file-page {
width: 100%;
max-width: var(--page-max-width--filepage);
margin-left: auto;
margin-right: auto;
margin-top: var(--spacing-m);
padding: 0 var(--spacing-m);
position: relative;
@media (min-width: $breakpoint-medium) {
$recommended-width: calc(var(--recommended-content-width) - var(--spacing-l) * 3 - var(--spacing-m) * 2);
display: grid;
grid-template-columns: 1fr $recommended-width;
justify-content: space-between;
gap: var(--spacing-l);
.file-page__recommended {
margin: 0 !important;
height: 100% !important;
width: 100% !important;
}
}
@media (max-width: $breakpoint-medium) {
margin-left: auto;
margin-right: auto;
display: flex;
flex-direction: row;
align-items: flex-start;
position: relative;
> :first-child {
flex-grow: 2;
}
.file-page__secondary-content {

View file

@ -53,6 +53,7 @@
--mobile: 600px;
--side-nav-width: 230px;
--side-nav-width--micro: 93px;
--recommended-content-width: 32rem;
--spacing-main-padding: var(--spacing-xl);
--floating-viewer-width: 32rem;