Skip to content

Commit 7ea3dc8

Browse files
committed
fix(editor): align code block borders
1 parent 45405f9 commit 7ea3dc8

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

packages/app/src/styles.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,6 +1162,8 @@
11621162
pointer-events: none;
11631163
}
11641164

1165+
/* The backdrop owns the continuous gutter divider. Keep this pseudo-element
1166+
inside the number column so it cannot cover that divider on text rows. */
11651167
.markdown-paper .cm-line.cm-markra-code-content-line::before {
11661168
position: relative;
11671169
z-index: 1;
@@ -1170,11 +1172,10 @@
11701172
min-width: 43px !important;
11711173
margin-right: 16px !important;
11721174
padding-right: 12px;
1173-
border-right: 1px solid var(--editor-border);
1175+
border-left: 1px solid var(--editor-border);
11741176
background: var(--editor-code-line-bg);
11751177
color: var(--editor-text-secondary) !important;
11761178
font: inherit;
1177-
box-shadow: 16px 0 0 var(--editor-code-bg);
11781179
}
11791180

11801181
.markdown-paper .cm-line.cm-markra-code-header-line +

packages/app/src/styles.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ describe("editor stylesheet", () => {
8585
expect(backdropRule).toContain("background: linear-gradient(");
8686
expect(lineNumberRule).toContain("position: relative");
8787
expect(lineNumberRule).toContain("z-index: 1");
88+
expect(lineNumberRule).toContain("border-left: 1px solid var(--editor-border)");
8889
expect(lineNumberRule).toContain("background: var(--editor-code-line-bg)");
89-
expect(lineNumberRule).toContain("box-shadow: 16px 0 0 var(--editor-code-bg)");
90+
expect(lineNumberRule).not.toContain("border-right:");
91+
expect(lineNumberRule).not.toContain("box-shadow:");
9092
});
9193

9294
it("matches the original code block control layout", () => {

0 commit comments

Comments
 (0)