Skip to content

Commit a0ba938

Browse files
committed
fix for increased browser font sizes
1 parent cd1260c commit a0ba938

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

frontend/src/lib/components/Editor.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@
14181418
{#if !editor}
14191419
<div class="inset-0 absolute overflow-clip">
14201420
<FakeMonacoPlaceHolder
1421-
marginLeft="3.19em"
1421+
marginLeft="51px"
14221422
{code}
14231423
fontSize={!small ? 14 : 12}
14241424
className="dark:bg-[#272D38] h-full"

frontend/src/lib/components/FakeMonacoPlaceHolder.svelte

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
</script>
1313

1414
<div
15-
class={'relative w-full pr-14 z-9 mt-[-0.026em] dark:bg-[#272D38] mb-[0.026em] leading-5 overflow-y-clip overflow-x-auto mycontainer ' +
15+
class={'relative w-full pr-14 z-9 mt-[-1px] mb-[1px] leading-[20px] dark:bg-[#272D38] overflow-y-clip overflow-x-auto mycontainer ' +
1616
className}
1717
style="padding-left: {marginLeft};"
1818
>
1919
<div
20-
class="absolute inset-x-0 h-[1.36em] dark:bg-[#3A4252] mix-blend-lighten"
20+
class="absolute inset-x-0 h-[59px] dark:bg-[#3A4252] mix-blend-lighten"
2121
style="margin-left: {marginLeft};"
2222
></div>
2323
<code
2424
class="text-nowrap whitespace-pre-wrap overflow-clip text-tertiary/50"
25-
style="font-size: {fontSize / 16}em;"
25+
style="font-size: {fontSize}px;"
2626
>
2727
{code}
2828
{#if code.endsWith('\n')}
@@ -34,7 +34,7 @@
3434
<style>
3535
.mycontainer::-webkit-scrollbar {
3636
/* Try to match monaco's scrollbar */
37-
height: 0.75em;
37+
height: 12px;
3838
}
3939
.mycontainer::-webkit-scrollbar-thumb {
4040
background-color: transparent;

frontend/src/lib/components/SimpleEditor.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@
559559
{/if}
560560

561561
{#if !editor}
562-
<FakeMonacoPlaceHolder marginLeft="1.44em" {code} fontSize={small ? 12 : 14} />
562+
<FakeMonacoPlaceHolder marginLeft="23px" {code} fontSize={small ? 12 : 14} />
563563
{/if}
564564

565565
<div

frontend/src/lib/components/TemplateEditor.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@
630630
<EditorTheme />
631631

632632
{#if !editor}
633-
<FakeMonacoPlaceHolder {code} {fontSize} marginLeft="1.6em" />
633+
<FakeMonacoPlaceHolder {code} {fontSize} marginLeft="25px" />
634634
{/if}
635635
<div
636636
bind:this={divEl}

0 commit comments

Comments
 (0)