thekid / dialog

Dialog photoblog
2 stars 1 forks source link

Change lightbox to use HTML <dialog> element #41

Closed thekid closed 1 year ago

thekid commented 1 year ago

Implements #31 and uses the <dialog> element and the associated JavaScript APIs instead of a regular div. This simplifies the code, e.g. because by default, a dialog invoked by the showModal() method will allow for its dismissal by the Escape.

Browser support

Looks good:

See also

https://css-tricks.com/almanac/selectors/b/backdrop/

thekid commented 1 year ago

Released in https://github.com/thekid/dialog/releases/tag/v1.10.0