react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

feat(RAC): expose `--page-width` and `--visual-viewport-width` from Modal

Open lixiaoyan opened this issue 2 days ago • 0 comments

Closes

This allows us to properly place a dialog with horizontal scroll document.

<ModalOverlay className="absolute top-0 left-0 h-(--page-height) w-(--page-width)">
  <Modal className="grid place-items-center sticky top-0 left-0 h-(--visual-viewport-height) w-(--visual-viewport-width)">
    <Dialog />
  </Modal>
</ModalOverlay>

✅ Pull Request Checklist:

  • [ ] Included link to corresponding React Spectrum GitHub Issue.
  • [ ] Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • [ ] Filled out test instructions.
  • [ ] Updated documentation (if it already exists for this component).
  • [ ] Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

lixiaoyan avatar Dec 10 '25 07:12 lixiaoyan