diff --git a/src/components/unstyled/collapse.css b/src/components/unstyled/collapse.css index f8fee07ad13..83844670f16 100644 --- a/src/components/unstyled/collapse.css +++ b/src/components/unstyled/collapse.css @@ -3,7 +3,7 @@ } .collapse { @apply relative grid overflow-hidden; - grid-template-rows: auto 0fr; + grid-template-rows: max-content 0fr; transition: grid-template-rows 0.2s; } .collapse-title, @@ -23,11 +23,11 @@ .collapse[open], .collapse-open, .collapse:focus:not(.collapse-close) { - grid-template-rows: auto 1fr; + grid-template-rows: max-content 1fr; } .collapse:not(.collapse-close):has(> input[type="checkbox"]:checked), .collapse:not(.collapse-close):has(> input[type="radio"]:checked) { - grid-template-rows: auto 1fr; + grid-template-rows: max-content 1fr; } .collapse[open] > .collapse-content, .collapse-open > .collapse-content,