summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBung <crc32@qq.com>2023-08-06 19:07:36 +0800
committerGitHub <noreply@github.com>2023-08-06 19:07:36 +0800
commitd2b197bdcd91667bbb42763b195d13cd293142fe (patch)
tree72f5d4c40e3bd98850dcf16e9e2b27304f0b5834
parentf18e4c4050cb59cf828372f89c01d9e80f6516c5 (diff)
downloadNim-d2b197bdcd91667bbb42763b195d13cd293142fe.tar.gz
Stick search result (#22394)
* nimdoc: stick search result inside browser viewport

* fix nimdoc.out.css

---------

Co-authored-by: Locria Cyber <74560659+locriacyber@users.noreply.github.com>
-rw-r--r--doc/nimdoc.css8
-rw-r--r--nimdoc/testproject/expected/nimdoc.out.css8
2 files changed, 14 insertions, 2 deletions
diff --git a/doc/nimdoc.css b/doc/nimdoc.css
index 1417d9eff..3fb5497ff 100644
--- a/doc/nimdoc.css
+++ b/doc/nimdoc.css
@@ -769,7 +769,13 @@ div.search_results {
   background-color: var(--third-background);

   margin: 3em;

   padding: 1em;

-  border: 1px solid #4d4d4d; }

+  border: 1px solid #4d4d4d;

+  position: sticky;

+  top: 0;

+  isolation: isolate;

+  z-index: 1;

+  max-height: 100vh;

+  overflow-y: scroll; }

 

 div#global-links ul {

   margin-left: 0;

diff --git a/nimdoc/testproject/expected/nimdoc.out.css b/nimdoc/testproject/expected/nimdoc.out.css
index 1417d9eff..3fb5497ff 100644
--- a/nimdoc/testproject/expected/nimdoc.out.css
+++ b/nimdoc/testproject/expected/nimdoc.out.css
@@ -769,7 +769,13 @@ div.search_results {
   background-color: var(--third-background);

   margin: 3em;

   padding: 1em;

-  border: 1px solid #4d4d4d; }

+  border: 1px solid #4d4d4d;

+  position: sticky;

+  top: 0;

+  isolation: isolate;

+  z-index: 1;

+  max-height: 100vh;

+  overflow-y: scroll; }

 

 div#global-links ul {

   margin-left: 0;