From 8b6974fad820c642d6b811c336b76d8611367342 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Sat, 21 Jul 2018 01:24:24 +0200 Subject: [PATCH] transition animations for drawers, and filter boxes --- style.css | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/style.css b/style.css index 8de1b34..bf113a9 100644 --- a/style.css +++ b/style.css @@ -69,13 +69,14 @@ a[href="#advsearch"]:before { #prefs, #bookmarks, #multitag, #advsearch { display: block; position: absolute; - height: 0; width: 100%; max-width: 100%; + max-height: 0; width: 100%; max-width: 100%; margin-top: -1px; padding: 0 1em; border: 1px none; overflow: hidden; background-color: #333; z-index: 1; + transition: max-height .5s linear; } #bookmarks { left: 0; width: 30%; @@ -93,7 +94,7 @@ a[href="#advsearch"]:before { #advsearch:target, #multitag:target, #prefs:target, #bookmarks:target { - height: auto; overflow: visible; + max-height: 100em; overflow: visible; } #advsearch:target { border-style: none none solid none; } #prefs:target { border-style: none none solid solid; } @@ -170,7 +171,21 @@ a[href="#advsearch"]:before { #advsearch input.and {display: none;} #advsearch input.and + label {display: none} -#advsearch input.and + label + .select {display: none;} +#advsearch input.and + label + .select { + display: inline-block; + position: relative; + width: 100%; min-width: 0; max-width: 0; + min-height: 12em; + overflow: hidden; + vertical-align: top; + border: none; + transition: max-width .5s linear; +} +#advsearch .submit { + display: inline-block; + width: 100%; + vertical-align: top; +} #advsearch input.and + label:nth-of-type(2), #advsearch input.and:checked + label + .select + input + label { @@ -188,23 +203,18 @@ a[href="#advsearch"]:before { #advsearch input.and:checked + label:nth-of-type(2), #advsearch input.and:checked + label { display: none; } -#advsearch .submit, #advsearch input.and + label + .select:first-of-type, #advsearch input.and:checked + label + .select { - display: inline-block; - position: relative; - width: 100%; + min-width: 200px; max-width: 100%; margin: 0 .5% 1em .5%; - min-height: 12em; - overflow: hidden; - vertical-align: top; + border: 1px solid; } @media (min-width: 460px){ #advsearch .submit, #advsearch input.and + label + .select:first-of-type, #advsearch input.and:checked + label + .select { - width: 49%; min-width: 200px; + width: 49%; } } @media (min-width: 660px){ #advsearch .submit, -- 2.39.2