diff --git a/apps/desktop/src/components/structure/TableStructureEditor.vue b/apps/desktop/src/components/structure/TableStructureEditor.vue index f297de2d37..3a05c0f50c 100644 --- a/apps/desktop/src/components/structure/TableStructureEditor.vue +++ b/apps/desktop/src/components/structure/TableStructureEditor.vue @@ -6637,11 +6637,6 @@ watch( inset 0 1px 0 color-mix(in oklab, var(--primary) 55%, transparent), inset 0 -1px 0 color-mix(in oklab, var(--primary) 55%, transparent); } - -/* Inputs are bg-transparent; give them a solid surface on the selected row so fields stay readable. */ -.structure-column-search-current :is(input, button, [role="combobox"], [data-slot="select-trigger"]) { - background-color: var(--background); -} ", scopedStyleStart); +const scopedStyle = source.slice(scopedStyleStart, scopedStyleEnd).replace(/\/\*[\s\S]*?\*\//g, ""); +const rules = [...scopedStyle.matchAll(/([^{}]+)\{([^{}]*)\}/g)].map((match) => ({ + selectors: match[1]!.split(",").map((selector) => selector.trim()), + declarations: match[2]!, +})); + +describe("TableStructureEditor selected-row styles", () => { + it("keeps the highlight on cells without repainting descendant controls", () => { + const selectedBackgroundRules = rules.filter(({ selectors, declarations }) => selectors.some((selector) => selector.includes(".structure-column-search-current")) && /background(?:-color)?\s*:/.test(declarations)); + + expect(selectedBackgroundRules).toHaveLength(1); + expect(selectedBackgroundRules[0]?.selectors).toEqual([".structure-column-search-current > td"]); + expect(selectedBackgroundRules[0]?.declarations).toContain("var(--primary)"); + + const gridControlRule = rules.find(({ selectors }) => selectors.includes(".structure-edit-grid :deep(.structure-grid-control)")); + expect(gridControlRule?.declarations).toContain("background-color: transparent;"); + }); +});