/* * Every builder popup's size limits and inner scrolling (`popups/builder-popover`). * * A held popup is no taller and no wider than the room it has, which the * popover measures from its held top-left corner, so the limits stay put as * the content changes, and content larger than the room scrolls inside. * In the components layer, so a popup's own rule (unlayered) or utility * class says otherwise where it lays out its own scrolling. */ @layer components { :where([data-nx-popup="held"]) { max-height: var(--radix-popover-content-available-height, 100vh); max-width: var(--radix-popover-content-available-width, 100vw); overflow: auto; } /* A popup told to keep its side, room or not, keeps its own width: capped to the room beside a nearby edge it would shrink to a sliver there. */ :where([data-nx-popup="held"][data-nx-popup-keep-side]) { max-width: none; } } /* * The moment between the popover first putting a popup down and the builder * choosing where it holds: unseen, not animating, and with no room limit, so * it is measured at its full size. Important, to outrank the animations and * the popover's own inline room. */ [data-nx-popup="placing"] { --radix-popover-content-available-height: 100000px !important; --radix-popover-content-available-width: 100000px !important; opacity: 0 !important; animation: none !important; }