Skip to content

Commit f229be7

Browse files
authored
Merge pull request #238 from MITLibraries/use-79
Introduce 1280px max width container with responsive behavior
2 parents 7028b37 + fe3e63a commit f229be7

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

app/assets/stylesheets/partials/_layouts.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
.wrap-gridband, .wrap-notice, .wrap-header,
2+
.wrap-header-local, .wrap-breadcrumb, .wrap-content,
3+
.wrap-footer, .wrap-footer-institute, .wrap-footer.footer-slim {
4+
5+
// Ensures the container is actually 1280px when space is available
6+
max-width: calc(#{$container-max-width} + (#{$edge-padding-tablet} * 2));
7+
8+
// Set desktop-sized padding
9+
padding: 20px $edge-padding-desktop;
10+
11+
// Set edge margins for tablet (portrait) devices
12+
@media (max-width: $bp-screen-md) {
13+
padding-left: $edge-padding-tablet;
14+
padding-right: $edge-padding-tablet;
15+
}
16+
17+
// Set edge margins for phone devices
18+
@media (max-width: $bp-screen-sm) {
19+
padding-left: $edge-padding-phone;
20+
padding-right: $edge-padding-phone;
21+
}
22+
23+
}
24+
125
.hidden-md {
226
@media (max-width: $bp-screen-md) {
327
display: none;

app/assets/stylesheets/partials/_variables.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,15 @@ $fw-bold: 700;
2020

2121
$lh-xtight: 0.92;
2222
$lh-base: 1.2;
23+
24+
// ----------------------------
25+
// #LAYOUT
26+
// ----------------------------
27+
28+
// Container max-width
29+
$container-max-width: 1280px;
30+
31+
// Left/Right Edge Padding
32+
$edge-padding-desktop: 32px;
33+
$edge-padding-tablet: 24px;
34+
$edge-padding-phone: 16px;

0 commit comments

Comments
 (0)