From dfb2b8a1c5e1ad262e18e0e2fb17e687f1e2acad Mon Sep 17 00:00:00 2001 From: Diego Colombo Date: Thu, 30 May 2024 22:56:45 +0100 Subject: [PATCH 1/2] css css: Update body dimensions in index.css The commit updates the width and height properties of the body element in index.css to "auto" instead of fixed values. This change allows for a more responsive layout. --- src/microsoft-trydotnet-editor/src/index.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/microsoft-trydotnet-editor/src/index.css b/src/microsoft-trydotnet-editor/src/index.css index 51780c633..a325782cd 100644 --- a/src/microsoft-trydotnet-editor/src/index.css +++ b/src/microsoft-trydotnet-editor/src/index.css @@ -1,5 +1,5 @@ body { - width: 800px; - height: 600px; + width: auto; + height: auto; border: 1px solid #ccc; } \ No newline at end of file From c77c7832eb181ce839289efa26ceabf07e72ae87 Mon Sep 17 00:00:00 2001 From: Diego Colombo Date: Thu, 30 May 2024 23:47:26 +0100 Subject: [PATCH 2/2] padding --- src/microsoft-trydotnet-editor/src/index.css | 7 ++++++- src/microsoft-trydotnet/src/sessionFactory.ts | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/microsoft-trydotnet-editor/src/index.css b/src/microsoft-trydotnet-editor/src/index.css index a325782cd..eb86ca905 100644 --- a/src/microsoft-trydotnet-editor/src/index.css +++ b/src/microsoft-trydotnet-editor/src/index.css @@ -1,5 +1,10 @@ -body { +.body { width: auto; height: auto; border: 1px solid #ccc; + margin: 0; +} + +.monaco-editor { + padding: 0.5rem; } \ No newline at end of file diff --git a/src/microsoft-trydotnet/src/sessionFactory.ts b/src/microsoft-trydotnet/src/sessionFactory.ts index a5cf95474..6e30a1be5 100644 --- a/src/microsoft-trydotnet/src/sessionFactory.ts +++ b/src/microsoft-trydotnet/src/sessionFactory.ts @@ -27,10 +27,10 @@ async function _createSession(configuration: Configuration, editorIFrame: HTMLIF const computedStyle = window.getComputedStyle(editorIFrame); - const paddingLeft = parseFloat(computedStyle.paddingLeft) || 2; - const paddingRight = parseFloat(computedStyle.paddingRight) || 2; - const paddingTop = parseFloat(computedStyle.paddingTop) || 2; - const paddingBottom = parseFloat(computedStyle.paddingBottom) || 2; + const paddingLeft = parseFloat(computedStyle.paddingLeft) || 5; + const paddingRight = parseFloat(computedStyle.paddingRight) || 5; + const paddingTop = parseFloat(computedStyle.paddingTop) || 5; + const paddingBottom = parseFloat(computedStyle.paddingBottom) || 5; const borderLeft = parseFloat(computedStyle.borderLeftWidth) || 0; const borderRight = parseFloat(computedStyle.borderRightWidth) || 0;