Skip to content

Commit

Permalink
Simplify heights
Browse files Browse the repository at this point in the history
  • Loading branch information
Mubelotix committed Jun 16, 2024
1 parent 973dc4e commit 9f7bf68
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 22 deletions.
7 changes: 1 addition & 6 deletions webui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ <h1>Admarus</h1>
</div>
</div>
</section>
</main>
<script>
// https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
let vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
</script>
</main>
</body>
</html>
6 changes: 3 additions & 3 deletions webui/src/pages/results/results.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#results-page {
background-color: #f5f5f5;
height: 100vh;
height: 100dvh;
width: 100%;
min-height: 100vh;
min-height: calc(var(--vh, 1vh) * 100 - 0.01px);
background-color: #f5f5f5;
}

#results-header {
Expand Down
2 changes: 1 addition & 1 deletion webui/src/pages/search/search.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body {

section {
height: 100vh;
height: calc(var(--vh, 1vh) * 100 - 0.01px);
height: 100dvh;
display: flex;
flex-direction: column;
align-items: center;
Expand Down
12 changes: 6 additions & 6 deletions webui/src/pages/settings/settings.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#settings-page {
height: 100vh;
height: 100dvh;
background-color: #f5f5f5;
}

#settings-button {
all: unset;
padding: 0.5rem;
width: 1.5rem;
height: 1.5rem;
cursor: pointer;
}

#settings-page {
background-color: #f5f5f5;
min-height: 100vh;
min-height: calc(var(--vh, 1vh) * 100 - 0.01px);
}
7 changes: 1 addition & 6 deletions webui/testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ <h1>Admarus</h1>
</div>
</div>
</section>
</main>
<script>
// https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
let vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
</script>
</main>
</body>
</html>

0 comments on commit 9f7bf68

Please sign in to comment.