Skip to content

Commit 02a12af

Browse files
authored
Fix hidden-text user-selection for Counter.svelte in default template (sveltejs#3398)
1 parent 86f8f8a commit 02a12af

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/create-svelte/templates/default/src/lib/Counter.svelte

+6-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<div class="counter-viewport">
2424
<div class="counter-digits" style="transform: translate(0, {100 * offset}%)">
25-
<strong style="top: -100%" aria-hidden="true">{Math.floor($displayed_count + 1)}</strong>
25+
<strong class="hidden" aria-hidden="true">{Math.floor($displayed_count + 1)}</strong>
2626
<strong>{Math.floor($displayed_count)}</strong>
2727
</div>
2828
</div>
@@ -94,4 +94,9 @@
9494
width: 100%;
9595
height: 100%;
9696
}
97+
98+
.hidden {
99+
top: -100%;
100+
user-select: none;
101+
}
97102
</style>

0 commit comments

Comments
 (0)