From 1a1847eeb52d6724c3dcab78951791006065b312 Mon Sep 17 00:00:00 2001 From: Lea Verou Date: Thu, 19 Dec 2024 19:48:38 -0500 Subject: [PATCH] Update search dialog styles to new simpler structure, closes #331 --- docs/assets/styles/hydration-errors.css | 2 +- docs/assets/styles/search.css | 31 +++++++++++-------------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/docs/assets/styles/hydration-errors.css b/docs/assets/styles/hydration-errors.css index b225dd431..708a61041 100644 --- a/docs/assets/styles/hydration-errors.css +++ b/docs/assets/styles/hydration-errors.css @@ -18,7 +18,7 @@ .diff-grid > * { height: 100%; } -.diff-dialog::part(dialog) { +.diff-dialog { max-width: 90vw; width: 90vw; } diff --git a/docs/assets/styles/search.css b/docs/assets/styles/search.css index 150c1abf2..f8b1ef015 100644 --- a/docs/assets/styles/search.css +++ b/docs/assets/styles/search.css @@ -1,14 +1,11 @@ #site-search { - --width: 38rem; - - &::part(dialog) { - position: absolute; - top: 0; - border-radius: var(--wa-border-radius-m); - padding: 0; - margin: 10rem auto; - overflow: hidden; - } + width: 38rem; + position: absolute; + top: 0; + border-radius: var(--wa-border-radius-m); + padding: 0; + margin: 10rem auto; + overflow: hidden; &::part(body) { padding: 0; @@ -18,21 +15,19 @@ justify-content: center; gap: 0.5rem; } + + @media screen and (max-width: 900px) { + max-width: calc(100% - 2rem); + margin-block: 1rem; + } } #site-search-container { display: flex; flex-direction: column; max-height: calc(100vh - 20rem); -} -@media screen and (max-width: 900px) { - #site-search::part(dialog) { - max-width: calc(100% - 2rem); - margin-block: 1rem; - } - - #site-search-container { + @media screen and (max-width: 900px) { max-height: calc(100dvh - 2rem); } }