Skip to content

fix(interact): make custom element layout transparent#221

Open
omribz156 wants to merge 1 commit into
wix:masterfrom
omribz156:codex/interact-element-display-contents
Open

fix(interact): make custom element layout transparent#221
omribz156 wants to merge 1 commit into
wix:masterfrom
omribz156:codex/interact-element-display-contents

Conversation

@omribz156
Copy link
Copy Markdown

Description

Adds the default layout-transparent style for <interact-element> when the custom element is registered.

defineInteractElement() now injects one interact-element { display: contents; } style element, so wrappers do not participate as inline boxes in grid/flex layout. The style injection is idempotent and still runs if the element was already registered.

Related Issue

Fixes #182

Checklist

  • I have read the Contributing Guide
  • I have added/updated tests for my changes (if applicable)
  • I have updated documentation/rules/skills (if applicable)

Screenshots / Demos

Not applicable.

Additional Notes

Verification:

  • corepack yarn install --immutable
  • corepack yarn workspace @wix/motion build
  • corepack yarn prettier packages\interact\src\web\defineInteractElement.ts packages\interact\test\web.spec.ts --check
  • corepack yarn workspace @wix/interact lint
  • corepack yarn workspace @wix/interact test -- test/web.spec.ts (Vitest ran the package suite: 9 files, 402 tests passed)
  • git diff --check

This was implemented with Codex assistance, with the patch kept focused on the layout wrapper behavior from the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<interact-element> breaks CSS grid layout

1 participant