From e59f76290191141d6774559cfccdc3ffc0e7ddcb Mon Sep 17 00:00:00 2001 From: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com> Date: Wed, 31 Jul 2024 03:45:12 +0530 Subject: [PATCH] fix(warnings): update styles (#1) * fix(warnings): update styles * Update .gitignore * Sneak in lil change --------- Co-authored-by: Joshua Chen --- .gitignore | 1 + bun.lockb | Bin 16897 -> 16897 bytes docs/warnings.css | 28 ++++++++++++++++++---------- docs/warnings.html | 4 ++-- src/client/warnings.ts | 4 +++- 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 5eee15b..5366fbd 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ data/* !data/.keep sidebars docs/*.js +*.txt diff --git a/bun.lockb b/bun.lockb index 18b1e2462f5c6c6f19cec8ef75d85382474e9f44..ad09832afde4df3b8b5ef3f4916432af4680fd24 100755 GIT binary patch delta 22 dcmZo{VQg$++^|)boiWZt&p^*$^B!GS5dc)42I>F+ delta 22 acmZo{VQg$++^|)borwVqHt*4O6#)QA7zLdG diff --git a/docs/warnings.css b/docs/warnings.css index 42fc7ad..73411f9 100644 --- a/docs/warnings.css +++ b/docs/warnings.css @@ -3,31 +3,39 @@ body { } header { - height: 2em; + height: 2rem; display: flex; flex-direction: column; - align-items: center; justify-content: center; } nav ul { display: flex; - gap: 2em; + gap: 2rem; } main { display: flex; - margin: 1em; - height: calc(100vh - 5em); + margin: 1rem 0 0 0; } select { - min-width: 300px; - height: 100%; + flex: none; + position: sticky; + top: 1rem; + padding: 0.4rem; + height: calc(100vh - 5rem); + overflow-y: auto; +} + +option { + margin: 0; + padding: 0; } ul { list-style: none; + padding-inline-start: 1rem; } summary { @@ -36,13 +44,13 @@ summary { } pre { - margin: 0; + margin: 0 0 0.4rem 1rem; } #note { - position: absolute; + position: fixed; top: 0; right: 0; - padding: 10px; + padding: 0.4rem; background-color: lightgray; } diff --git a/docs/warnings.html b/docs/warnings.html index 90ed99b..318c30e 100644 --- a/docs/warnings.html +++ b/docs/warnings.html @@ -10,8 +10,8 @@
diff --git a/src/client/warnings.ts b/src/client/warnings.ts index b762089..e23bb38 100644 --- a/src/client/warnings.ts +++ b/src/client/warnings.ts @@ -80,7 +80,9 @@ function createTree( for (const li of ul.children as HTMLCollectionOf) (li.children[0] as HTMLDetailsElement).open = true; } - root.append(ul); + if (ul.childElementCount > 0) { + root.append(ul); + } return count; }