From 1257860c8c1593eb4dfb17b91de3db69ef586edf Mon Sep 17 00:00:00 2001 From: Shulhan Date: Tue, 21 Nov 2023 17:25:52 +0700 Subject: editor: update layout without using float --- editor/editor.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/editor/editor.ts b/editor/editor.ts index dc58cd6..0c81f2a 100644 --- a/editor/editor.ts +++ b/editor/editor.ts @@ -155,9 +155,8 @@ export class WuiEditor { background-color: bisque; border-right: 1px dashed brown; color: dimgrey; + display: inline-block; font-family: monospace; - float: left; - left: 0px; margin-right: 8px; padding: 0px 8px; position: sticky; @@ -165,11 +164,11 @@ export class WuiEditor { width: 3em; } .${WUI_EDITOR_CLASS_CONTENT} { - // Do not use "float: left" to fix line break. display: inline-block; padding: 0px 8px; + vertical-align: top; white-space: pre; - width: calc(100% - 6em); + width: calc(100% - 10em); word-wrap: normal; } `; -- cgit v1.3