fix(popover): remove hidden popover from layout to kill phantom scrollbar

Flowbite re-initialises popovers on every htmx swap. A popover hidden via
Tailwind `invisible` (visibility:hidden) still occupies layout, so once
Popper parks it with a transform offset it expands the table's
overflow-x-auto wrapper and a spurious scrollbar appears (horizontal here,
vertical in #40). Add `[&.invisible]:hidden` so the popover is removed from
layout while hidden; Flowbite drops `invisible` on show, restoring display.

Relates to #40. e2e regression covers no-overflow-after-swap plus
popover-still-shows-on-hover.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 22:39:49 +02:00
parent 8637c547e4
commit b6f6da309f
3 changed files with 70 additions and 123 deletions
+5 -119
View File
@@ -1487,9 +1487,6 @@
.h-10 {
height: calc(var(--spacing) * 10);
}
.h-12 {
height: calc(var(--spacing) * 12);
}
.h-\[calc\(100\%-1rem\)\] {
height: calc(100% - 1rem);
}
@@ -2489,9 +2486,6 @@
.align-middle {
vertical-align: middle;
}
.align-top {
vertical-align: top;
}
.font-mono {
font-family: var(--font-mono);
}
@@ -2754,9 +2748,6 @@
.text-white {
color: var(--color-white);
}
.text-yellow-300 {
color: var(--color-yellow-300);
}
.lowercase {
text-transform: lowercase;
}
@@ -2904,106 +2895,6 @@
.ring-inset {
--tw-ring-inset: inset;
}
.group-hover\:absolute {
&:is(:where(.group):hover *) {
@media (hover: hover) {
position: absolute;
}
}
}
.group-hover\:-top-8 {
&:is(:where(.group):hover *) {
@media (hover: hover) {
top: calc(var(--spacing) * -8);
}
}
}
.group-hover\:-left-6 {
&:is(:where(.group):hover *) {
@media (hover: hover) {
left: calc(var(--spacing) * -6);
}
}
}
.group-hover\:max-w-none {
&:is(:where(.group):hover *) {
@media (hover: hover) {
max-width: none;
}
}
}
.group-hover\:min-w-60 {
&:is(:where(.group):hover *) {
@media (hover: hover) {
min-width: calc(var(--spacing) * 60);
}
}
}
.group-hover\:rounded-xs {
&:is(:where(.group):hover *) {
@media (hover: hover) {
border-radius: var(--radius-xs);
}
}
}
.group-hover\:bg-purple-600 {
&:is(:where(.group):hover *) {
@media (hover: hover) {
background-color: var(--color-purple-600);
}
}
}
.group-hover\:px-6 {
&:is(:where(.group):hover *) {
@media (hover: hover) {
padding-inline: calc(var(--spacing) * 6);
}
}
}
.group-hover\:py-3\.5 {
&:is(:where(.group):hover *) {
@media (hover: hover) {
padding-block: calc(var(--spacing) * 3.5);
}
}
}
.group-hover\:text-purple-100 {
&:is(:where(.group):hover *) {
@media (hover: hover) {
color: var(--color-purple-100);
}
}
}
.group-hover\:decoration-purple-900 {
&:is(:where(.group):hover *) {
@media (hover: hover) {
text-decoration-color: var(--color-purple-900);
}
}
}
.group-hover\:outline-4 {
&:is(:where(.group):hover *) {
@media (hover: hover) {
outline-style: var(--tw-outline-style);
outline-width: 4px;
}
}
}
.group-hover\:outline-purple-400 {
&:is(:where(.group):hover *) {
@media (hover: hover) {
outline-color: var(--color-purple-400);
}
}
}
.group-hover\:outline-dashed {
&:is(:where(.group):hover *) {
@media (hover: hover) {
--tw-outline-style: dashed;
outline-style: dashed;
}
}
}
.group-data-\[search-select-highlighted\]\:border-white {
&:is(:where(.group)[data-search-select-highlighted] *) {
border-color: var(--color-white);
@@ -3487,11 +3378,6 @@
outline-color: var(--color-brand-strong);
}
}
.sm\:table-cell {
@media (width >= 40rem) {
display: table-cell;
}
}
.sm\:max-w-\(--breakpoint-sm\) {
@media (width >= 40rem) {
max-width: var(--breakpoint-sm);
@@ -3647,11 +3533,6 @@
}
}
}
.lg\:table-cell {
@media (width >= 64rem) {
display: table-cell;
}
}
.lg\:max-w-3xl {
@media (width >= 64rem) {
max-width: var(--container-3xl);
@@ -4242,6 +4123,11 @@
}
}
}
.\[\&\.invisible\]\:hidden {
&.invisible {
display: none;
}
}
.\[\&\:first-of-type_button\]\:rounded-s-lg {
&:first-of-type button {
border-start-start-radius: var(--radius-lg);