Skip to content

Commit 9192fa3

Browse files
committed
refactor: improve code-eidtor styles
1 parent d4d38e2 commit 9192fa3

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

projects/code-editor/code-editor.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ const External = Annotation.define<boolean>();
2929
selector: 'code-editor',
3030
standalone: true,
3131
template: ``,
32+
styles: `
33+
.code-editor {
34+
display: block;
35+
36+
.cm-editor {
37+
height: 100%;
38+
}
39+
}
40+
`,
41+
host: {
42+
class: 'code-editor',
43+
},
3244
encapsulation: ViewEncapsulation.None,
3345
changeDetection: ChangeDetectionStrategy.OnPush,
3446
providers: [
@@ -46,7 +58,7 @@ export class CodeEditor implements OnInit, OnDestroy, ControlValueAccessor {
4658
*/
4759
@Input() root?: Document | ShadowRoot;
4860

49-
/** Whether focus on the editor when init. */
61+
/** Whether focus on the editor after init. */
5062
@Input({ transform: booleanAttribute }) autoFocus = false;
5163

5264
/** Editor's value. */

0 commit comments

Comments
 (0)