这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged

css #1208

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/microsoft-trydotnet-editor/src/index.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
body {
width: 800px;
height: 600px;
.body {
width: auto;
height: auto;
border: 1px solid #ccc;
Copy link
Contributor

@jwmunn jwmunn May 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:
If you update this to add margin: 0; and then add padding to .monaco-editor then it will get rid of that white border in dark mode.

body {
	width: auto;
	height: auto;
	border: 1px solid #ccc;
    margin: 0;
 }
 
.monaco-editor {
   padding: 0.5rem; // 8px
}

Before
image

After
image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!!

margin: 0;
}

.monaco-editor {
padding: 0.5rem;
}
8 changes: 4 additions & 4 deletions src/microsoft-trydotnet/src/sessionFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down