Skip to content

Commit

Permalink
Improve container responsiveness (#74)
Browse files Browse the repository at this point in the history
* consolidate container max widths

* Update src/styles/_Grid.scss

Co-authored-by: Joseph Fusco <josephfusco@users.noreply.github.com>

Co-authored-by: Joseph Fusco <josephfusco@users.noreply.github.com>
  • Loading branch information
apmatthews and josephfusco authored Mar 31, 2022
1 parent 81b71c3 commit 0b52d81
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 24 deletions.
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;

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

1 comment on commit 0b52d81

@headless-platform-by-wp-engine

Choose a reason for hiding this comment

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

Branch main was deployed successfully
Your environment main of app atlas-bp-portfolio was successfully updated
View build logs: https://my.wpengine.com/atlas#/atlas-bp-portfolio/o9og0bwp1wgbx352zgxg3euj/nfqn235jffyvu6mcte8z3b3m
View your environment URL: https://ho9og0bwp1wgbx352zgxg3euj.js.wpenginepowered.com

Please sign in to comment.