update font size
This commit is contained in:
parent
d74523d15d
commit
ccc1e182cf
11
src/css/editor.css
Normal file
11
src/css/editor.css
Normal file
@ -0,0 +1,11 @@
|
||||
@import url("./colors.css");
|
||||
|
||||
.code {
|
||||
width: 100%;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.syntax-error {
|
||||
color: var(--red);
|
||||
background-color: var(--yellow);
|
||||
}
|
@ -19,7 +19,13 @@ import {
|
||||
} from "../components";
|
||||
import { Coord2D, Direction } from "../interfaces";
|
||||
import { openModal, closeModal } from "../utils";
|
||||
import { EditorState, StateField, StateEffect, Range } from "@codemirror/state";
|
||||
import {
|
||||
EditorState,
|
||||
StateField,
|
||||
StateEffect,
|
||||
Range,
|
||||
Extension,
|
||||
} from "@codemirror/state";
|
||||
import { Decoration, EditorView, keymap } from "@codemirror/view";
|
||||
import { defaultKeymap } from "@codemirror/commands";
|
||||
import rainbowBrackets from "rainbowbrackets";
|
||||
@ -48,6 +54,12 @@ const highlightExtension = StateField.define({
|
||||
},
|
||||
provide: (f) => EditorView.decorations.from(f),
|
||||
});
|
||||
const FontSizeTheme = EditorView.theme({
|
||||
$: {
|
||||
fontSize: "20pt",
|
||||
},
|
||||
});
|
||||
const FontSizeThemeExtension: Extension = [FontSizeTheme];
|
||||
|
||||
export class LambdaFactory extends Entity {
|
||||
private static spriteSpec: SpriteSpec = SPRITE_SPECS.get(
|
||||
@ -218,6 +230,7 @@ export class LambdaFactory extends Entity {
|
||||
keymap.of(defaultKeymap),
|
||||
rainbowBrackets(),
|
||||
highlightExtension,
|
||||
FontSizeThemeExtension,
|
||||
],
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user