Active-CSS / active-css

The epic event-driven browser language for UI with functionality in one-liner CSS. Over 100 incredible CSS commands for DOM manipulation, ajax, reactive variables, single-page application routing, and lots more. Could CSS be the JavaScript framework of the future?
https://activecss.org
Other
42 stars 7 forks source link

Create command for opening native dialog element modal #294

Closed bob2517 closed 9 months ago

bob2517 commented 1 year ago

Per title.

bob2517 commented 1 year ago

Possible syntax to open dialog: show-modal: selector;

Check the native close and cancel dialog events work as existing syntax.

bob2517 commented 1 year ago

Also has close and show methods. May need to do something like dialog-open, dialog-show, dialog-show-modal instead. Or dialog: selector (show|show-modal|close); as a shorthand. Eg. dialog: #myDialog show-modal;.

bob2517 commented 10 months ago

Tagging for 2.15.0

bob2517 commented 10 months ago

Going with this for now to avoid confusion:

dialog-show: selector;
dialog-show-modal: selector;
dialog-close: selector;
bob2517 commented 10 months ago

Changing to this to simplify a bit - it's a bit messy with two pages in the docs to look at when learning how to show the two different types of dialog:

dialog-show: selector [modal];
dialog-close: selector;
bob2517 commented 10 months ago

Now on branch. Docs offline are complete, along with an example for using the return value from a dialog box form.

bob2517 commented 9 months ago

Closing pending release.