Skip to content

pm-pp/baseline

Repository files navigation

Things explored & learned

Popover versus modal dialog

Source

The modal <dialog> element

  • Opened with dialog.showModal().
  • Closed with dialog.close().
  • Makes the rest of the page inert.
  • Does not support light-dismiss behavior.
  • You can style the open state with the [open] attribute.
  • Semantically represents an interactive component that blocks interaction with the rest of the page.

The [popover] attribute

  • Can be opened with a declarative invoker (popovertarget).
  • Closed with popovertarget (auto popover) or popovertargetaction=hide (manual popover).
  • Does not make the rest of the page inert.
  • Supports light-dismiss behavior.
  • You can style the open state with the :popover-open pseudo-class.
  • No inherent semantics.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published