Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
fix(material-docs-app): remove absolute positioning of all content
Browse files Browse the repository at this point in the history
- preserve behavior of not having a scrollbar next to the toolbar
- hide theme picker on small devices (iPhone 5) so that navbar doesn't wrap
  • Loading branch information
Splaktar committed Aug 7, 2020
1 parent 23060f6 commit c140b1a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"moment": "^2.24.0",
"rxjs": "^6.5.4",
"tslib": "^1.11.1",
"zone.js": "0.10.3"
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1000.0",
Expand Down
21 changes: 5 additions & 16 deletions src/app/material-docs-app.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
material-docs-app {
display: flex;
flex-direction: column;
position: absolute;
top: 56px;
bottom: 0;
left: 0;
right: 0;
height: 100vh;
}

app-navbar {
Expand All @@ -20,21 +16,14 @@ material-docs-app > app-component-sidenav {
flex: 1;
}

material-docs-app > app-homepage,
material-docs-app > app-guides,
material-docs-app > guide-viewer {
material-docs-app > router-outlet + * {
margin-top: 56px;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}

@media (max-width: 720px) {
material-docs-app {
top: 92px;
}

material-docs-app > app-homepage,
material-docs-app > app-guides,
material-docs-app > guide-viewer {
overflow-y: visible;
material-docs-app > router-outlet + * {
margin-top: 92px;
}
}
8 changes: 8 additions & 0 deletions src/app/shared/navbar/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,11 @@
margin: 0;
}
}

theme-picker {
display: none;

@media (min-width: 328px) {
display: block;
}
}
5 changes: 5 additions & 0 deletions src/styles/_general.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
html,
body {
height: 100vh;
}

body {
font-family: "Roboto","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
margin: 0;
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12121,7 +12121,7 @@ zip-stream@^2.1.2:
compress-commons "^2.1.1"
readable-stream "^3.4.0"

[email protected]:
zone.js@~0.10.3:
version "0.10.3"
resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.10.3.tgz#3e5e4da03c607c9dcd92e37dd35687a14a140c16"
integrity sha512-LXVLVEq0NNOqK/fLJo3d0kfzd4sxwn2/h67/02pjCjfKDxgx1i9QqpvtHD8CrBnSSwMw5+dy11O7FRX5mkO7Cg==

0 comments on commit c140b1a

Please sign in to comment.