Open scottaohara opened 1 year ago
I want to mention a reverse case: when we can have inline content that is present on a larger viewport, but might need to be a popover/toggletip on a smaller one. Example: side-notes, where we might want to display them in a sidebar alongside their context, but transform them into toggletips when there is not enough space.
I can imagine other cases, where based on various media (or even container?) properties we would want to either display an element always, or make it a popover/tooltip/toggletip. So, as an author, I would really want to have something that allows this built in, compared to implementing this behavior from scratch.
at least from the way i've been thinking about this, the reverse seems a bit 'easier' to handle because one can set a [popover]
element to be display: block
and the biggest hurdle then is to undo all the default UA styles for [popover]
so that it can be rendered inline.
Maybe invokertarget
and similar CSS overwriting could be the answer for my use case - where it's two distinct buttons to toggle the sometimes popover content. but right now, without invokertarget, the only way one can toggle content without it being a popover is to custom create a button aria-expanded=...
triggering element.
a very basic example of making popover content appear for viewports larger than 600px, but rendered as a popover below that viewport size
I know we discussed this as well because I definitely brought examples of where wanted this and where we fell down on this with controls like <details>
. I still want this.
The Open UI Community Group just discussed Responsive popovers to inline content?
, and agreed to the following:
RESOLVED: this use case typically requires Javascript and/or explicitly overriding the display property. Action item: add author guidance to the spec for this use case.
There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.
At one point in time we had been talking about how one might want to have content rendered as a popover at larger viewport sizes, but not at smaller viewports. E.g., a website navigation which has sub-navigation popovers, but at small screen those sub-navigations, when toggled open, are rendered inline.
From what I can tell, there isn't really a way to do this without someone needing to specifically remove the popover attribute(s) and re-implement the content as a custom disclosure widget.
The point of this issue is to close the loop on this topic - is this a feature we would want to create/support for popover, or is the solution to manually remove the popoveriness of an element if it's not meant to be a popover in x scenario?