diff --git a/src/editor/_code.scss b/src/editor/_code.scss index bc9e03e..838a4e1 100644 --- a/src/editor/_code.scss +++ b/src/editor/_code.scss @@ -41,6 +41,8 @@ body { white-space: pre; word-break: normal; overflow-wrap: normal; - width: max-content; - min-width: 100%; + width: auto; + min-width: 0; + overflow-x: auto; + overflow-y: hidden; } diff --git a/tests/editor-blocks.test.mjs b/tests/editor-blocks.test.mjs index 61becc1..4553403 100644 --- a/tests/editor-blocks.test.mjs +++ b/tests/editor-blocks.test.mjs @@ -237,8 +237,10 @@ test("keeps CM6 fenced code lines on one horizontal line", () => { ["white-space", "pre"], ["word-break", "normal"], ["overflow-wrap", "normal"], - ["width", "max-content"], - ["min-width", "100%"], + ["width", "auto"], + ["min-width", "0"], + ["overflow-x", "auto"], + ["overflow-y", "hidden"], ], ); }); diff --git a/theme.css b/theme.css index cfab98e..fd7eb1a 100644 --- a/theme.css +++ b/theme.css @@ -297,8 +297,10 @@ body { white-space: pre; word-break: normal; overflow-wrap: normal; - width: max-content; - min-width: 100%; + width: auto; + min-width: 0; + overflow-x: auto; + overflow-y: hidden; } body {