Skip to content

Commit 91bce72

Browse files
author
Marc Schlaeppi
committed
Align modal Milkdown padding with notes
1 parent 2cdd123 commit 91bce72

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

ui/src/lib/milkdown_overrides.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@
358358
The handle is two 32px .operation-item buttons with a 2px gap = 66px total,
359359
so we allow room for the full width plus a small margin.
360360
(Crepe default is 60px 120px; we keep top/right/bottom tighter.) */
361+
.iris-markdown-editor .milkdown .ProseMirror,
361362
.iris-split .milkdown .ProseMirror {
362363
padding: 24px 28px 24px 84px;
363364
}
@@ -561,6 +562,7 @@
561562

562563
/* Reduce Crepe padding on narrow screens, but keep enough left padding
563564
for the 66px block handle to stay inside the clipped scroll box. */
565+
.iris-markdown-editor .milkdown .ProseMirror,
564566
.iris-split .milkdown .ProseMirror {
565567
padding: 16px 20px 16px 80px;
566568
}

ui/test/legacy_description_controls.test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { readFile } from 'node:fs/promises';
33
import test from 'node:test';
44

55
const root = new URL('../../', import.meta.url);
6+
const overridesUrl = new URL('ui/src/lib/milkdown_overrides.css', root);
67
const descriptions = [
78
['modal_add_case_ioc.html', 'case.ioc.js', 'ioc'],
89
['modal_add_case_event.html', 'case.timeline.js', 'event'],
@@ -23,3 +24,12 @@ test('case description forms use Milkdown without legacy preview controls', asyn
2324
assert.doesNotMatch(script, new RegExp(`g_${prefix}_desc_editor\\.setOption\\("minLines", "10"\\)`));
2425
}
2526
});
27+
28+
test('shared Milkdown fields use the same content padding as notes', async () => {
29+
const overrides = await readFile(overridesUrl, 'utf8');
30+
31+
assert.match(
32+
overrides,
33+
/\.iris-markdown-editor \.milkdown \.ProseMirror,\s*\.iris-split \.milkdown \.ProseMirror\s*{\s*padding: 24px 28px 24px 84px;/,
34+
);
35+
});

0 commit comments

Comments
 (0)