fixes in css
This commit is contained in:
@@ -137,3 +137,23 @@ test("Markdown/Text uses the same toolbar action styling as More", async () => {
|
||||
assert.match(css, /\.markdown-more>summary,\s*\.pad-page \.toolbar-action \{/);
|
||||
assert.match(editorSource, /modeToggle\.setAttribute\("aria-pressed", String\(markdown\)\)/);
|
||||
});
|
||||
|
||||
test("zoomed editor uses compact labels without hiding any view", async () => {
|
||||
const html = await readFile(new URL("../static/editor.html", import.meta.url), "utf8");
|
||||
const css = await readFile(new URL("../static/css/styles.css", import.meta.url), "utf8");
|
||||
const editorSource = await readFile(new URL("../static/js/note-editor.js", import.meta.url), "utf8");
|
||||
|
||||
assert.match(html, /id="mode-toggle"[\s\S]*?control-label-full">Markdown<[\s\S]*?control-label-short" aria-hidden="true">M</);
|
||||
assert.match(html, /data-view="edit"[\s\S]*?>E<[\s\S]*?data-view="split"[\s\S]*?>S<[\s\S]*?data-view="preview"[\s\S]*?>P</);
|
||||
assert.match(css, /@media \(max-width: 1699px\) \{[\s\S]*?\.pad-page :is\(#mode-toggle, \.view-switch\) \.control-label-full \{\s*display:\s*none;/);
|
||||
assert.match(css, /@media \(max-width: 760px\) \{[\s\S]*?grid-template-columns:\s*minmax\(0, 1fr\) auto auto;[\s\S]*?#mode-toggle \{\s*display:\s*inline-flex;[\s\S]*?button\[data-view="split"\][\s\S]*?display:\s*inline-flex;/);
|
||||
assert.match(editorSource, /modeToggle\.querySelector\("\.control-label-short"\)\.textContent = markdown \? "M" : "T";/);
|
||||
});
|
||||
|
||||
test("history panel wraps long content without horizontal scrolling", async () => {
|
||||
const css = await readFile(new URL("../static/css/styles.css", import.meta.url), "utf8");
|
||||
assert.match(css, /\.history-list \{[\s\S]*?overflow-x:\s*hidden;[\s\S]*?overflow-y:\s*auto;/);
|
||||
assert.match(css, /\.revision \{[\s\S]*?grid-template-columns:\s*12px minmax\(0, 1fr\);/);
|
||||
assert.match(css, /\.revision__meta strong,[\s\S]*?\.revision__preview \{[\s\S]*?overflow-wrap:\s*anywhere;[\s\S]*?word-break:\s*break-word;/);
|
||||
assert.match(css, /\.revision__preview \{[\s\S]*?overflow-x:\s*hidden;[\s\S]*?white-space:\s*pre-wrap;/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user