Skip to content

Commit

Permalink
📱 better mobile support for view height (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
chase-manning authored Oct 25, 2023
1 parent 80bc1a2 commit 98d1ee1
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions src/components/Browse.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.browse {
width: 100%;
height: 400vh;
height: 400dvh;
position: relative;
}

.browse-content {
width: 100%;
height: 100vh;
height: 100dvh;
display: absolute;
top: 0;
left: 0;
Expand Down
8 changes: 4 additions & 4 deletions src/components/Community.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.community {
width: 100%;
height: 100vh;
height: 100dvh;
background: #f4f5f6;
position: relative;
overflow: hidden;
Expand All @@ -18,7 +18,7 @@
.community-left-glow {
position: absolute;
width: 50%;
height: 100vh;
height: 100dvh;
top: 70%;
left: -12.5%;
background: #73d7e8;
Expand All @@ -29,7 +29,7 @@
.community-right-glow {
position: absolute;
width: 50%;
height: 100vh;
height: 100dvh;
top: 70%;
right: -12.5%;
background: #73d7e8;
Expand All @@ -40,7 +40,7 @@
.community-top-glow {
position: absolute;
width: 100%;
height: 100vh;
height: 100dvh;
top: -50%;
left: 0;
background: #73d7e8;
Expand Down
32 changes: 16 additions & 16 deletions src/components/Community.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,10 @@ const Community = () => {
key={firstIndex}
className={className}
style={{
top: `${uwu.top * 100}vh`,
left: `${uwu.side * 100}vh`,
width: `${uwu.size * 100}vh`,
height: `${uwu.size * 100}vh`,
top: `${uwu.top * 100}dvh`,
left: `${uwu.side * 100}dvh`,
width: `${uwu.size * 100}dvh`,
height: `${uwu.size * 100}dvh`,
animationDelay: `${Math.random() * 1}s`,
}}
>
Expand All @@ -249,10 +249,10 @@ const Community = () => {
key={secondIndex}
className={className}
style={{
top: `${uwu.top * 100}vh`,
right: `${uwu.side * 100}vh`,
width: `${uwu.size * 100}vh`,
height: `${uwu.size * 100}vh`,
top: `${uwu.top * 100}dvh`,
right: `${uwu.side * 100}dvh`,
width: `${uwu.size * 100}dvh`,
height: `${uwu.size * 100}dvh`,
animationDelay: `${Math.random() * 1}s`,
}}
>
Expand Down Expand Up @@ -281,10 +281,10 @@ const Community = () => {
key={firstIndex}
className={className}
style={{
top: `${uwu.top * 100}vh`,
left: `${uwu.side * 100}vh`,
width: `${uwu.size * 100}vh`,
height: `${uwu.size * 100}vh`,
top: `${uwu.top * 100}dvh`,
left: `${uwu.side * 100}dvh`,
width: `${uwu.size * 100}dvh`,
height: `${uwu.size * 100}dvh`,
animationDelay: `${Math.random() * 1}s`,
}}
>
Expand All @@ -298,10 +298,10 @@ const Community = () => {
key={secondIndex}
className={className}
style={{
top: `${uwu.top * 100}vh`,
right: `${uwu.side * 100}vh`,
width: `${uwu.size * 100}vh`,
height: `${uwu.size * 100}vh`,
top: `${uwu.top * 100}dvh`,
right: `${uwu.side * 100}dvh`,
width: `${uwu.size * 100}dvh`,
height: `${uwu.size * 100}dvh`,
animationDelay: `${Math.random() * 1}s`,
}}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
bottom: 0;
left: 0;
width: 100%;
height: calc(100vh - 7rem);
height: calc(100dvh - 7rem);
background: rgba(28, 31, 34, 0.8);
mix-blend-mode: multiply;
z-index: 1;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Hero.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: flex;
flex-direction: column;
width: 100%;
height: 100vh;
height: 100dvh;
background: linear-gradient(
180deg,
#f5dce8 0%,
Expand Down
6 changes: 3 additions & 3 deletions src/components/Why.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.why-fixed {
width: 100%;
height: 100vh;
height: 100dvh;
top: 0;
left: 0;
background: var(--main);
Expand Down Expand Up @@ -28,7 +28,7 @@
width: 50%;
top: 0;
right: 0;
height: 100vh;
height: 100dvh;
background: linear-gradient(
0deg,
var(--main) 0%,
Expand All @@ -43,7 +43,7 @@

.why-fixed-image-container {
width: 50%;
height: 100vh;
height: 100dvh;
overflow: hidden;
}

Expand Down

0 comments on commit 98d1ee1

Please sign in to comment.