Skip to content

Commit

Permalink
site: show REPL input/output toggle on iOS without scrolling (#5175)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfr authored Aug 12, 2020
1 parent e879cb5 commit dccdb9f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion site/src/components/Repl/InputOutputToggle.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<style>
.input-output-toggle {
display: grid;
position: absolute;
user-select: none;
flex: 0;
grid-template-columns: 1fr 40px 1fr;
grid-gap: 0.5em;
align-items: center;
Expand Down
3 changes: 3 additions & 0 deletions site/src/components/Repl/ReplWidget.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
background-color: var(--back);
overflow: hidden;
box-sizing: border-box;
Expand All @@ -98,6 +100,7 @@
.viewport {
width: 100%;
height: 100%;
flex: 1;
}
.mobile .viewport {
Expand Down
1 change: 1 addition & 0 deletions site/src/routes/_layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@

<style>
main {
height: 100%;
position: relative;
margin: 0 auto;
/* padding: var(--nav-h) var(--side-nav) 0 var(--side-nav); */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ export default app;` });
background-color: var(--second);
color: white;
white-space: nowrap;
flex: 0;
}
.icon {
Expand Down
5 changes: 4 additions & 1 deletion site/src/routes/repl/[id]/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,16 @@
<style>
.repl-outer {
position: relative;
height: calc(100vh - var(--nav-h));
height: 100%;
--app-controls-h: 5.6rem;
--pane-controls-h: 4.2rem;
overflow: hidden;
background-color: var(--back);
padding: var(--app-controls-h) 0 0 0;
/* margin: 0 calc(var(--side-nav) * -1); */
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.viewport {
Expand All @@ -136,6 +138,7 @@
width: 200%;
height: calc(100% - 42px);
transition: transform 0.3s;
flex: 1;
}
.mobile .offset {
Expand Down
2 changes: 2 additions & 0 deletions site/src/routes/repl/embed.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
overflow: hidden;
box-sizing: border-box;
--pane-controls-h: 4.2rem;
display: flex;
flex-direction: column;
}
</style>

Expand Down

0 comments on commit dccdb9f

Please sign in to comment.