-
Notifications
You must be signed in to change notification settings - Fork 208
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] Position via HTML attribute rather than CSS property #458
Comments
Reusing the
Are these benefits moot if the additional syntax is expressed in CSS rather than in HTML? |
Yes. This is why I don't think it's a good idea to specify anchored positioning in CSS. I have put down some more thoughts here. |
I think I'll close this issue for now, and we can revisit once the anchor pos proposal is up. |
I think that rather than specifying a new CSS property or value to indicate the origin of the position for a popup, it should/could be done with an HTML attribute, something like:
<popup for=#myElement>
This would mean that the popup element positions relative to the top-left logical edge
#myElement
when open. If needed, additional syntax could be added to indicate a center- or right-aligned origin point as well.The advantage of doing this is that it allows the User Agent to stop positioning it in that way as soon as the popup is dismissed. It is desirable for the User Agent to do that because otherwise all of the complex scrolling and compositing paths will have to be augmented so as to keep the popup positioned relative to the element.
With the HTML attribute, the User Agent can dismiss the popup under all of the situations when complex things would otherwise happen, such as threaded scrolling or animation changes.
I suggested
for=
based on the TAG review feedback from Lea Verou.The text was updated successfully, but these errors were encountered: