Skip to content
Merged
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
3 changes: 3 additions & 0 deletions website/src/components/DiffEditorMonaco.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export default function DiffEditor({ documents, fallback }: DiffMonacoProps) {
(editor: MonacoDiffEditor) => {
handleMount(editor);
const panes = [editor.getOriginalEditor(), editor.getModifiedEditor()];
// Side-by-side forces a glyph margin on the original pane; nothing
// renders there in this read-only diff, so it only indents the code
panes[0].updateOptions({ glyphMargin: false });
const updateOffsets = () => {
const left = editor.getContainerDomNode().getBoundingClientRect().left;
const next = panes.map(
Expand Down
12 changes: 12 additions & 0 deletions website/src/components/Playground/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@
--pg-tab-selected: #e3e8f2;
--pg-tab-selected-bg: var(--monoco-code-background);
}
/* Dark mode: the editor column sits a step above the code, darker than the
neutral preview headers, so the two sides read apart without a divider */
:root[data-theme='dark']
.playgroundContainer:not(.endpointPlayground)
.playgroundTextEdit {
--pg-bar: hsl(229, 14%, 21%);
--pg-tab-hover-bg: hsl(229, 14%, 26%);
}
/* EndpointPlayground's right column is code, so it always uses the dark bar */
.endpointPlayground {
--pg-bar: hsl(229, 8%, 26%);
Expand Down Expand Up @@ -543,6 +551,10 @@ div.fixtureJson {
letter-spacing: 0.06em;
text-transform: uppercase;
}
/* Match the space below the last line */
.playgroundContainer.standaloneEditor .diffLabels + .playgroundEditor {
padding-top: 10px;
}
.diffLabels > span {
position: absolute;
left: 0.75rem;
Expand Down
Loading