Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[popup] Allow <div popup> as a shorthand for <div popup=popup> #514

Closed
zcorpan opened this issue Apr 7, 2022 · 1 comment
Closed

[popup] Allow <div popup> as a shorthand for <div popup=popup> #514

zcorpan opened this issue Apr 7, 2022 · 1 comment

Comments

@zcorpan
Copy link
Contributor

zcorpan commented Apr 7, 2022

https://open-ui.org/components/popup.research.explainer#html-content-attribute

A new content attribute, popup, controls both the top layer status and the dismiss behavior. There are several allowed values for this attribute:

  • popup=popup - A top layer element following “Popup” dismiss behaviors (see below).
  • popup=hint - A top layer element following “Hint” dismiss behaviors (see below).
  • popup=async - A top layer element following “Async” dismiss behaviors (see below).

The proposal for popups is now a global attribute instead of an element or a set of elements for popups, as discussed in #410 (comment)

For developer ergonomics, I suggest allowing the empty string as a valid value that is a synonym to popup. That is, these should be equivalent:

<div popup=popup></div>

<div popup></div>

Since popup=popup looks the same as a boolean attribute, developers may expect the short form popup to work.

There are some enumerated attributes in HTML where the empty string is a valid keyword: crossorigin, hidden, contenteditable, translate, preload, spellcheck.

cc @mfreed7

@gregwhitworth
Copy link
Member

Closing as the boolean option is being discussed in 491

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants