79434945

Date: 2025-02-13 02:40:23
Score: 0.5
Natty:
Report link

As Brett Donald's answer shows, in the future it will be possible to use anchor-positioning. He also correctly stated that popovers are positioned in the center by default.

For those looking to use "position: absolute" (e.g. in browsers where anchor-positioning is not yet supported), it suffices to remove the default positioning using "all: initial". Note that this will reset all inherited properties to their initial values, so it may remove other markup as well.

Example:

nav:popover-open {
    /* Undo the default popover-positioning,
       make sure to have this before position: absolute */
    all: initial;

    position: absolute;
        top: 8rem;
        right: var(--width-content-gap);
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: NwN