Skip to content

Commit 845e10f

Browse files
committed
🐛 Pin auth overlay to viewport and lift header above it
1 parent 4b8f9a9 commit 845e10f

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

moderate_ui/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function App() {
100100
}> = ({ containerProps }) => {
101101
return (
102102
<>
103-
<Box mb="md">
103+
<Box mb="md" style={{ position: "relative", zIndex: 100 }}>
104104
<HeaderMegaMenu />
105105
</Box>
106106
<Container

moderate_ui/src/pages/Homepage.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,8 @@ const useStyles = createStyles((theme) => ({
177177
justifyContent: "center",
178178
},
179179
overlay: {
180-
position: "absolute",
181-
top: 0,
182-
left: 0,
183-
width: "100%",
184-
height: "100%",
180+
position: "fixed",
181+
inset: 0,
185182
background:
186183
theme.colorScheme === "dark"
187184
? "rgba(0, 0, 0, 0.7)"
@@ -191,12 +188,15 @@ const useStyles = createStyles((theme) => ({
191188
display: "flex",
192189
alignItems: "center",
193190
justifyContent: "center",
191+
padding: theme.spacing.md,
194192
},
195193
overlayCard: {
196194
maxWidth: 400,
197195
width: "100%",
198196
margin: theme.spacing.md,
199197
textAlign: "center",
198+
maxHeight: `calc(100vh - ${theme.spacing.md * 2}px)`,
199+
overflowY: "auto",
200200
},
201201
}));
202202

@@ -267,7 +267,7 @@ export const Homepage: React.FC = () => {
267267

268268
return (
269269
<Box className={classes.wrapper}>
270-
<Container size="lg" style={{ position: "relative" }}>
270+
<Container size="lg">
271271
<div className={classes.logo}>
272272
<img
273273
src="/images/moderate-logo-collapsed.png"

0 commit comments

Comments
 (0)