From 5aaf6e861ff86e074126a4c29282c59fbab6eb87 Mon Sep 17 00:00:00 2001 From: Luck Date: Sat, 27 Mar 2021 21:41:08 +0000 Subject: [PATCH] autofocus, exclude line numbers from selection --- src/components/EditorTextArea.js | 2 ++ src/style/base.css | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/EditorTextArea.js b/src/components/EditorTextArea.js index 17b2ee2..d02a89a 100644 --- a/src/components/EditorTextArea.js +++ b/src/components/EditorTextArea.js @@ -23,6 +23,7 @@ export default function EditorTextArea({ code, setCode, language, fontSize }) { padding={10} size={fontSize} textareaId='code-area' + autoFocus={true} /> ) @@ -50,5 +51,6 @@ const StyledReactEditor = styled(ReactEditor)` text-align: right; width: 40px; font-weight: 100; + user-select: none; } `; diff --git a/src/style/base.css b/src/style/base.css index aae5c27..b89327c 100644 --- a/src/style/base.css +++ b/src/style/base.css @@ -1,4 +1,4 @@ -@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital@0;1&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100;0,400;0,700;1,100;1,400;1,700&display=swap'); html, body {