Skip to content

Commit 3578738

Browse files
committed
small improvement to pad spacing
1 parent 8349828 commit 3578738

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

site/src/editor/mod.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1477,13 +1477,7 @@ pub fn Editor<'a>(
14771477
<div class="line-numbers">
14781478
{ line_numbers }
14791479
</div>
1480-
<div
1481-
class="code-and-overlay">
1482-
<div
1483-
id=overlay_id
1484-
class="code-overlay">
1485-
{ move || gen_code_view(&overlay.get()) }
1486-
</div>
1480+
<div class="code-and-overlay">
14871481
/////////////////////////
14881482
// The text entry area //
14891483
/////////////////////////
@@ -1493,13 +1487,19 @@ pub fn Editor<'a>(
14931487
autocorrect="false"
14941488
autocapitalize="off"
14951489
spellcheck="false"
1490+
translate="no"
14961491
on:paste=code_paste
14971492
on:input=code_input
14981493
on:mousemove=code_mouse_move
14991494
on:mouseleave=code_mouse_leave
15001495
value=initial_code_str>
15011496
</textarea>
15021497
/////////////////////////
1498+
<div
1499+
id=overlay_id
1500+
class="code-overlay">
1501+
{ move || gen_code_view(&overlay.get()) }
1502+
</div>
15031503
</div>
15041504
</div>
15051505
<div id="code-right-side">

site/styles.css

+6-2
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,12 @@ input[type=number] {
470470
}
471471

472472
.code-entry {
473+
margin: 0.1em 0 0 0;
474+
padding: 0;
475+
position: absolute;
473476
outline: none;
474477
border: none;
475-
padding: 0.15em 0 0.15em 0;
476-
margin: 0 0 0 0;
478+
box-sizing: border-box;
477479
/* background-color: #0002; */
478480
/* color: #0008; */
479481
background-color: transparent;
@@ -494,6 +496,8 @@ input[type=number] {
494496
}
495497

496498
.code-overlay {
499+
margin: 0;
500+
padding: 0;
497501
position: absolute;
498502
width: 100%;
499503
pointer-events: none;

0 commit comments

Comments
 (0)