-
Notifications
You must be signed in to change notification settings - Fork 22.8k
Editorial review: Document popover="hint" #37990
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
Conversation
Preview URLs (17 pages)
Flaws (82)Note! 8 documents with no flaws that don't need to be listed. 🎉 URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
URL:
External URLs (4)URL:
URL: URL: (comment last updated: 2025-02-25 09:49:43) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just a few small comments.
files/en-us/web/api/htmlbuttonelement/popovertargetelement/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/api/htmlinputelement/popovertargetelement/index.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-authoritative LGTM
Close now. Last comment #37990 (comment) |
## Styling popovers | ||
|
||
The popover API has some related CSS features available that are worth looking at. | ||
The Popover API has some related CSS techniques available that are worth looking at. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If these are part of the same spec, which I believe they are, this might be better as.
The Popover API has some related CSS techniques available that are worth looking at. | |
Popovers can be styled and positioned using CSS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are not wrong, but "Popovers can be styled and positioned using CSS." sounds a bit obvious — popovers are HTML elements, so of course they can be styled using CSS!
I thought about it a bit, and ended up going with:
This section covers some CSS selection and positioning techniques relevant to popovers.
} | ||
``` | ||
|
||
You can select only popovers that are showing using the {{cssxref(":popover-open")}} pseudo-class: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps (i.e. I am not sure why "showing" doesn't work as well for me.)
You can select only popovers that are showing using the {{cssxref(":popover-open")}} pseudo-class: | |
You can select only popovers that are being displayed using the {{cssxref(":popover-open")}} pseudo-class: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing about "showing" is that it is a specific semantic state for popovers, along with "hidden" for when they are not showing. These states differ from open/closed, for example.
I'd prefer to keep "showing", as it is the correct semantic spec language, and is consistent with how we talk about it across the rest of MDN.
|
||
### Styling the popover backdrop | ||
|
||
The {{cssxref("::backdrop")}} pseudo-element is a full-screen element placed directly behind showing popover elements in the {{glossary("top layer")}}, allowing effects to be added to the page content behind the popover(s) if desired. You might for example want to blur out the content behind the popover to help focus the user's attention on it: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, I don't like "showing" as an adjective. Consider
The {{cssxref("::backdrop")}} pseudo-element is a full-screen element placed directly behind showing popover elements in the {{glossary("top layer")}}, allowing effects to be added to the page content behind the popover(s) if desired. You might for example want to blur out the content behind the popover to help focus the user's attention on it: | |
The {{cssxref("::backdrop")}} pseudo-element is a full-screen element placed directly behind open popover elements in the {{glossary("top layer")}}, allowing effects to be added to the page content behind the popover(s) if desired. You might for example want to blur out the content behind the popover to help focus the user's attention on it: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, "showing" is the correct semantic term here. "Open" isn't correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrisdavidmills I have made a few very minor nit suggestions. But this is excellent. Approving so you can merge when you are ready.
Thanks @hamishwillee, for an awesome and thorough review! |
* Document popover=hint * Fixes for mfreed7 comments, added info about implicit anchor references * Update files/en-us/web/api/htmlelement/popover/index.md Co-authored-by: Hamish Willee <[email protected]> * Update files/en-us/web/api/htmlelement/popover/index.md Co-authored-by: Hamish Willee <[email protected]> * Update files/en-us/web/html/global_attributes/popover/index.md Co-authored-by: Hamish Willee <[email protected]> * Update files/en-us/web/api/htmlelement/popover/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fixes for hamishwillee review comments * Clean up in light of hamishwillee and lukewarlow review comments * remove anchor attribute content from guide * last few bits of cleanup * Restructure popover anchor positioning information * small wording adjustment --------- Co-authored-by: Hamish Willee <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Description
Chrome 133 supports the
popover
attributehint
value, which creates popovers that do not light-dismissauto
popovers when shown. This is useful for situations where, for example, you have toolbar buttons that can be pressed to show UI popovers, but you also want to reveal tooltips when the buttons are hovered, without dismissing the UI popovers.This PR adds the HTML
popover
attributehint
value to thepopover
HTML global attribute page and theHTMLElement.popover
DOM API equivalent.It also adds a section explaining how to use
popover="hint"
to the Popover API "Using..." guide.As a bonus, I've also added info about the implicit anchor references that are created between popovers (makes CSS anchor positioning easier to use with popovers).
See https://chromestatus.com/feature/5073251081912320 for the data source.
There is no reason why this can't be tech-reviewed now, but we can't merge it until the dom-examples example is reviewed and merged. I am therefore keeping this as a draft for now.
Motivation
Additional details
Related issues and pull requests
popover="hint"
attribute value browser-compat-data#25864Fixes mdn/mdn#598
Fixes #38233