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 Jan 30, 2021
1 parent 4c71715 commit c2c0adf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
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;
}
}
7 changes: 7 additions & 0 deletions src/app/shared/navbar/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,10 @@
margin: 0;
}
}
theme-picker {
display: none;

@media (min-width: 328px) {
display: block;
}
}
4 changes: 4 additions & 0 deletions src/styles/_general.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
html,
body {
height: 100vh;
}
body {
font-family: "Roboto","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
margin: 0;
Expand Down

0 comments on commit c2c0adf

Please sign in to comment.