Skip to content

Commit 55efa0e

Browse files
mindronesConduitry
authored andcommitted
Site: REPL temp fix for the output pane does not receiving touch events on mobile & tablet
Applying this fix to make the site accessible on mobile again, will remove when https://github.com/sveltejs/svelte-repl/issues/8 gets fixed and published Fixes #2499 #2550
1 parent 788519b commit 55efa0e

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

site/src/routes/examples/index.svelte

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,9 @@
9797
</svelte:head>
9898

9999
<div class='examples-container' bind:clientWidth={width}>
100-
<div
101-
class="viewport offset-{offset}"
102-
>
100+
<div class="viewport offset-{offset}">
103101
<TableOfContents {sections} active_section={active_slug} {isLoading} />
104-
<div class="toc" class:loading={isLoading}>
102+
<div class="repl-container" class:loading={isLoading}>
105103
<Repl
106104
bind:this={repl}
107105
{svelteUrl}
@@ -136,10 +134,24 @@
136134
grid-auto-rows: 100%;
137135
}
138136
139-
.toc.loading {
137+
.repl-container.loading {
140138
opacity: 0.6;
141139
}
142140
141+
/* temp fix for #2499 and #2550 while waiting for a fix for https://github.com/sveltejs/svelte-repl/issues/8 */
142+
143+
.repl-container :global(.tab-content),
144+
.repl-container :global(.tab-content.visible) {
145+
pointer-events: all;
146+
opacity: 1;
147+
}
148+
.repl-container :global(.tab-content) {
149+
visibility: hidden;
150+
}
151+
.repl-container :global(.tab-content.visible) {
152+
visibility: visible;
153+
}
154+
143155
.offset-1 { transform: translate(-33.333%, 0); }
144156
.offset-2 { transform: translate(-66.666%, 0); }
145157

site/src/routes/repl/index.svelte

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,20 @@
155155
transform: translate(-50%, 0);
156156
}
157157
158+
/* temp fix for #2499 and #2550 while waiting for a fix for https://github.com/sveltejs/svelte-repl/issues/8 */
159+
160+
.viewport :global(.tab-content),
161+
.viewport :global(.tab-content.visible) {
162+
pointer-events: all;
163+
opacity: 1;
164+
}
165+
.viewport :global(.tab-content) {
166+
visibility: hidden;
167+
}
168+
.viewport :global(.tab-content.visible) {
169+
visibility: visible;
170+
}
171+
158172
.zen-mode {
159173
position: fixed;
160174
width: 100%;

0 commit comments

Comments
 (0)