Skip to content

Commit b3d1054

Browse files
committed
Simple responsive dashboard layout
1 parent 9b70a2c commit b3d1054

File tree

6 files changed

+19
-16
lines changed

6 files changed

+19
-16
lines changed

frontend/components/MainContent/_styles.scss

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
.main-content {
2-
padding: $pad-xlarge;
2+
padding: $pad-small;
33
background-color: $core-white;
44
flex-grow: 1;
55
// overflow: auto allows for horizontal scrolling
66
// of the main-content when there is a banner. (e.g. sandbox mode)
77
// Without it the main content pushes the banner off the page.
88
overflow: auto;
9+
10+
@media (min-width: $break-mobile-sm) {
11+
padding: $pad-xxlarge;
12+
}
913

1014
> :not(.main-content--animation-disabled) {
1115
animation: fade-in 250ms ease-out;

frontend/components/Modal/_styles.scss

+4-3
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,16 @@
7878
padding: $pad-xxlarge;
7979
border-radius: 8px;
8080
animation: scale-up 150ms ease-out;
81+
width: 100%;
8182

8283
&__medium {
83-
width: 650px;
84+
max-width: 650px;
8485
}
8586
&__large {
86-
width: 800px;
87+
max-width: 800px;
8788
}
8889
&__xlarge {
89-
width: 850px;
90+
max-width: 850px;
9091
}
9192
&__auto {
9293
width: auto;

frontend/layouts/CoreLayout/CoreLayout.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ const CoreLayout = ({ children, router, location }: ICoreLayoutProps) => {
6161

6262
return (
6363
<div className="app-wrap">
64-
<UnsupportedScreenSize />
6564
<nav className="site-nav-container">
6665
<SiteTopNav
6766
config={config}

frontend/layouts/CoreLayout/_styles.scss

+1-10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
display: flex;
33
flex-direction: column;
44
min-height: 100vh;
5+
min-width: 320px;
56
background-color: $ui-off-white;
67
}
78

@@ -13,11 +14,6 @@
1314
background-color: $core-white;
1415
display: flex;
1516

16-
// App hidden below 768px
17-
@media (max-width: $break-xs - 1px) {
18-
display: none;
19-
}
20-
2117
// App not hidden when printing
2218
@media print {
2319
display: initial;
@@ -39,11 +35,6 @@
3935
left: 0;
4036
z-index: 100;
4137

42-
// Nav hidden below 768px;
43-
@media (max-width: $break-xs - 1px) {
44-
display: none;
45-
}
46-
4738
// Nav not hidden when printing
4839
@media print {
4940
display: initial;

frontend/pages/DashboardPage/components/InfoCard/_styles.scss

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
.dashboard-info-card {
2-
padding: 32px;
2+
padding: $pad-medium;
33
width: 100%;
44
background-color: $core-white;
55
border: 1px solid $ui-fleet-black-10;
66
border-radius: 8px;
77
box-sizing: border-box;
88

9+
@media (min-width: $break-mobile-sm) {
10+
padding: $pad-xlarge;
11+
}
12+
913
&__section-title-cta {
1014
display: flex;
1115
justify-content: space-between;

frontend/styles/var/breakpoints.scss

+4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ $break-lg: 1400px;
44
$break-md: 990px;
55
$break-sm: 880px;
66
$break-xs: 768px;
7+
<<<<<<< HEAD
78
$break-mobile-lg: 650px;
89
$break-mobile-md: 576px;
910
$break-mobile-sm: 480px;
1011
$break-mobile-xs: 320px;
12+
=======
13+
$break-xxs: 480px;
14+
>>>>>>> c134e94f55 (Simple responsive dashboard layout)
1115
$tooltip-break-md: 1000px; // Prevents horizontal scrolling off viewport
1216
$table-controls-break: 1150px;

0 commit comments

Comments
 (0)