Skip to content

Commit dccdb9f

Browse files
authored
site: show REPL input/output toggle on iOS without scrolling (#5175)
1 parent e879cb5 commit dccdb9f

File tree

6 files changed

+12
-2
lines changed

6 files changed

+12
-2
lines changed

site/src/components/Repl/InputOutputToggle.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<style>
66
.input-output-toggle {
77
display: grid;
8-
position: absolute;
98
user-select: none;
9+
flex: 0;
1010
grid-template-columns: 1fr 40px 1fr;
1111
grid-gap: 0.5em;
1212
align-items: center;

site/src/components/Repl/ReplWidget.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@
8989
left: 0;
9090
width: 100%;
9191
height: 100%;
92+
display: flex;
93+
flex-direction: column;
9294
background-color: var(--back);
9395
overflow: hidden;
9496
box-sizing: border-box;
@@ -98,6 +100,7 @@
98100
.viewport {
99101
width: 100%;
100102
height: 100%;
103+
flex: 1;
101104
}
102105
103106
.mobile .viewport {

site/src/routes/_layout.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262

6363
<style>
6464
main {
65+
height: 100%;
6566
position: relative;
6667
margin: 0 auto;
6768
/* padding: var(--nav-h) var(--side-nav) 0 var(--side-nav); */

site/src/routes/repl/[id]/_components/AppControls/index.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ export default app;` });
228228
background-color: var(--second);
229229
color: white;
230230
white-space: nowrap;
231+
flex: 0;
231232
}
232233
233234
.icon {

site/src/routes/repl/[id]/index.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,16 @@
117117
<style>
118118
.repl-outer {
119119
position: relative;
120-
height: calc(100vh - var(--nav-h));
120+
height: 100%;
121121
--app-controls-h: 5.6rem;
122122
--pane-controls-h: 4.2rem;
123123
overflow: hidden;
124124
background-color: var(--back);
125125
padding: var(--app-controls-h) 0 0 0;
126126
/* margin: 0 calc(var(--side-nav) * -1); */
127127
box-sizing: border-box;
128+
display: flex;
129+
flex-direction: column;
128130
}
129131
130132
.viewport {
@@ -136,6 +138,7 @@
136138
width: 200%;
137139
height: calc(100% - 42px);
138140
transition: transform 0.3s;
141+
flex: 1;
139142
}
140143
141144
.mobile .offset {

site/src/routes/repl/embed.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
overflow: hidden;
2828
box-sizing: border-box;
2929
--pane-controls-h: 4.2rem;
30+
display: flex;
31+
flex-direction: column;
3032
}
3133
</style>
3234

0 commit comments

Comments
 (0)