preline icon indicating copy to clipboard operation
preline copied to clipboard

Offcanvas should have 'hidden' class

Open jlahijani opened this issue 3 years ago • 1 comments

This example, and the related examples, should include a hidden class on the parent offcanvas div: https://preline.co/docs/offcanvas.html#example

Before: <div id="hs-offcanvas-top" class="hs-offcanvas hs-offcanvas-open:translate-y-0 -translate-y-full fixed top-0 inset-x-0 transition-all duration-300 transform max-h-40 h-full w-full z-[60] bg-white border-b dark:bg-gray-800 dark:border-gray-700" tabindex="-1">

After: <div id="hs-offcanvas-top" class="hs-offcanvas hidden hs-offcanvas-open:translate-y-0 -translate-y-full fixed top-0 inset-x-0 transition-all duration-300 transform max-h-40 h-full w-full z-[60] bg-white border-b dark:bg-gray-800 dark:border-gray-700" tabindex="-1">

It still works if adding that class. This also makes it consistent with the modal examples.

jlahijani avatar Jul 06 '22 23:07 jlahijani

Hi, @jlahijani -

Thanks for your help and for using Preline UI.

You are right and we will add the .hidden class to the parent div. However, all modal components already have a .hidden class.

Thanks!

Mr-Zafar avatar Jul 08 '22 04:07 Mr-Zafar