Skip to content

Commit a0d5ee1

Browse files
fix: Prevent modal container expansion when FAQ answers are opened
Fixes #265 Signed-off-by: YadavAkhileshh <yadavakhil2501@gmail.com>
1 parent d253c56 commit a0d5ee1

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

site/src/App.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ const App = () => {
6565
overlayClassName="Overlay"
6666
ariaHideApp={false}
6767
contentLabel="Playground Selection"
68-
width="2000px"
6968
>
7069
<Button className="close-modal-btn" onClick={closeModal}>
7170
&times;

site/src/index.style.js

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,27 @@ export const GlobalStyle = createGlobalStyle`
1111
}
1212
}
1313
.Modal {
14-
position: fixed;
15-
inset: 50% auto auto 50%;
16-
border: 1px solid rgb(204, 204, 204);
1714
background: ${(props) => props.theme.body};
18-
border-radius: 0.5rem;
1915
outline: none;
20-
padding: 20px;
21-
margin-right: -50%;
16+
position: fixed;
17+
top: 50%;
18+
left: 50%;
2219
transform: translate(-50%, -50%);
23-
max-width: 85%;
24-
max-height: 80vh;
25-
overflow-y: auto;
26-
&::-webkit-scrollbar {
27-
display: none;
28-
}
20+
height: 80vh;
21+
width: 85%;
22+
overflow: hidden;
23+
padding: 20px;
24+
border: 1px solid rgb(204, 204, 204);
25+
border-radius: 0.5rem;
2926
@media (max-width: 59rem) {
30-
max-width: 85%;
27+
width: 90%;
28+
}
29+
.content {
30+
height: 100%;
31+
overflow-y: auto;
32+
&::-webkit-scrollbar {
33+
display: none;
34+
}
3135
}
3236
.close-modal-btn {
3337
min-width: 2rem;

0 commit comments

Comments
 (0)