all repos — searchix @ 70340c792a3c956bb73337a51970cc16dfff391d

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: Port modals to no-js variant

Kaya
commit

70340c792a3c956bb73337a51970cc16dfff391d

parent

02efd4e911618272b5b4863a730c64654a34914a

1 file changed, 25 insertions(+), 2 deletions(-)

changed files
M frontend/static/style.cssfrontend/static/style.css
@@ -171,9 +171,30 @@
dialog { max-width: unset; width: min(var(--min-width), 90%); + border: none; + outline: var(--border-width) solid var(--border); } -dialog > button { +dialog[open]:not(:modal) { + position: fixed; + inset: 0; + max-height: 85vh; + margin: auto; + z-index: 1000; + overflow: auto; +} + +dialog[open]:not(:modal)::before { + content: ""; + position: fixed; + inset: 0; + z-index: -1; + background-color: var(--bg); + opacity: 0.8; +} + +dialog > button, +dialog > a.button { float: right; }
@@ -343,9 +364,11 @@ width: 100%;
padding: 1rem 1ch; } - dialog > button { + dialog > button, + dialog > a.button { float: none; display: block; + width: fit-content; margin-left: auto; }