Skip to content
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

Improve container responsiveness #74

Merged
merged 2 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/components/ContentWrapper/ContentWrapper.module.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import 'styles/Variables';

.content {
max-width: $grid-max-width;
max-width: $content-max-width;
margin: 0 auto;
line-height: 1.6875;

Expand Down
28 changes: 8 additions & 20 deletions src/styles/_Grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@

.container {
margin: 0 auto;
max-width: $grid-max-width;
max-width: $container-max-width;
padding: 0 2rem;
position: relative;
width: 100%;

&.small {
max-width: $container-max-width-sm;
max-width: $content-max-width;
}
}

@media (min-width: $breakpoint-medium) {
.container {
width: percentage(10/12);
}
}

Expand Down Expand Up @@ -180,24 +186,6 @@
}
}

@media (min-width: 102.5rem) {
.container {
max-width: 120rem;
}
}

@media (max-width: 102.4rem) {
.container {
max-width: 102.4rem;
}
}

@media (max-width: 76.8rem) {
.container {
max-width: 76.8rem;
}
}

@media (min-width: 40rem) {
.row {
flex-direction: row;
Expand Down
6 changes: 3 additions & 3 deletions src/styles/_Variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ $breakpoint-extra-small: 640px;
$breakpoint-small: 768px;
$breakpoint-medium: 1024px;

$grid-max-width: 62rem;
$container-max-width: 102.4rem;
$container-max-width-sm: 64rem;
$container-max-width: 1200px;

$content-max-width: 620px;
Copy link
Member Author

Choose a reason for hiding this comment

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

$grid-max-width and $container-max-width-sm were very similar, so I merged them into a single $content-max-width variable.


$box-shadow: 0px 0px 50px rgba(0, 0, 0, 0.1);