From a1f77159d5b0012d53f607285ce5c475cda4ce64 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Thu, 12 Nov 2026 12:50:04 -0800 Subject: [PATCH 1/2] fix: keep DocSearch modal above the Vue School banner The banner is position:fixed with z-index 99999 and DocSearch's container is z-index 200, so on mobile the banner covered the full-screen search input and Cancel button. --- .vitepress/config.mts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 5f5f4235..a8d32eaa 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -43,8 +43,11 @@ export default defineConfig({ { async: 'true', src: 'https://vueschool.io/banner.js?affiliate=NSCRIPT&type=top', - } + } ], + // The banner is fixed at z-index 99999; without this it covers the + // full-screen DocSearch input on mobile. + ['style', {}, '.DocSearch.DocSearch-Container{z-index:100000}'], ], ignoreDeadLinks: true, cleanUrls: true, From d1c4b77207e44328ae7186053ab296b1b204e5b8 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Thu, 12 Nov 2026 13:07:22 -0800 Subject: [PATCH 2/2] fix: hide the Vue School banner while search is open on mobile Replaces the DocSearch z-index override with a narrower rule: below DocSearch's 768px full-screen breakpoint, hide #bb-banner-container while body.DocSearch--active is set. Desktop and the closed state are unchanged. --- .vitepress/config.mts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.vitepress/config.mts b/.vitepress/config.mts index a8d32eaa..e979e1fe 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -45,9 +45,13 @@ export default defineConfig({ src: 'https://vueschool.io/banner.js?affiliate=NSCRIPT&type=top', } ], - // The banner is fixed at z-index 99999; without this it covers the - // full-screen DocSearch input on mobile. - ['style', {}, '.DocSearch.DocSearch-Container{z-index:100000}'], + // The banner is fixed at z-index 99999 and covers DocSearch's input when + // the modal goes full-screen (DocSearch's 768px breakpoint). + [ + 'style', + {}, + '@media (max-width:768px){body.DocSearch--active #bb-banner-container{display:none!important}}', + ], ], ignoreDeadLinks: true, cleanUrls: true,