fix: sidebar mobile passe au-dessus de la barre d outils du bas (BUG-103)
CI / lint (push) Failing after 2m11s
CI / test (push) Skipped
CI / build (push) Skipped
CI / e2e (push) Skipped
CI / security (push) Successful in 1m58s

- en mobile le sidebar de navigation (z-index 200) passait sous .mobile-toolbar (900, 64 px) : les dernieres entrees de l'arbre etaient masquees
- regle mobile .sidebar : z-index 200 -> 950 ; test de non-regression 'mobile sidebar over toolbar' dans unit.test.mjs
This commit is contained in:
2026-10-02 15:34:35 -04:00
parent 3d618eb660
commit 83e6a951dd
12 changed files with 45 additions and 14 deletions
+17
View File
@@ -307,6 +307,22 @@ function testSyntaxHighlightTheme() {
console.log(' ✓ syntax highlighting follows the theme mode (BUG-078)');
}
// ── Test mobile : le sidebar passe par-dessus la barre d'outils du bas (BUG-103) ──
function testMobileSidebarOverToolbar() {
const css = readFileSync(join(JS_DIR, '..', 'style.css'), 'utf-8');
const zOf = (selector) => {
const blocks = css.match(new RegExp('\\' + selector + ' \\{[^}]*\\}', 'g')) || [];
return Math.max(0, ...blocks.map((b) => Number((b.match(/z-index: (\d+)/) || [])[1] || 0)));
};
const sidebarZ = zOf('.sidebar');
const toolbarZ = zOf('.mobile-toolbar');
assert.ok(
sidebarZ > toolbarZ,
`.sidebar z-index (${sidebarZ}) doit être supérieur à .mobile-toolbar (${toolbarZ})`,
);
console.log(' ✓ mobile sidebar over toolbar');
}
// ── Run all tests ──────────────────────────────────────────────────────────
async function main() {
let passed = 0, failed = 0;
@@ -324,6 +340,7 @@ async function main() {
['config TOC icons', testConfigTocIcons],
['sidebar user section', testSidebarUserSection],
['syntax highlight theme', testSyntaxHighlightTheme],
['mobile sidebar over toolbar', testMobileSidebarOverToolbar],
];
for (const [name, fn] of tests) {