pico
pico copied to clipboard
Better documentationn for modal animation
When I used the modal dialog, I saw following entry in the docs
.modal-is-openingbrings an opening animation.
I assumed applying this to html would enable opening animation. It took some try and error to find out if I need to set this attribute before or after I set open, and how long I need to wait.
The docs should include the nescessary js code.
Hi @LokiMidgard,
Yes, I understand. I don't want to document the JavaScript (or not too much) because I consider that it is not part of Pico.
But for sure we can bring more details to the documentation. What would be your suggestions?
I understand the JS part. And thats what I like about pico.
Mybe something like this:
To animate opening
1. Set .modal-is-opening on html
2. then trigger opening of dialog
3. wait 400ms (or the variable that holds the value if it is configurable)
4. remove the class again
To close
1. set modal-is-closing
2. wait 400ms
3. close the dialog
4. remove the class
I'm not 100% sure if thats how it is inteded, but it seams to work...
If I were shure, I would have propably already created an pullrequest ^^
can i work on this?