diff --git a/UNRELEASED.md b/UNRELEASED.md index 5785b512041..aaa2fe92a0a 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -10,6 +10,7 @@ Use [the changelog guidelines](/documentation/Versioning%20and%20changelog.md) t ### Bug fixes +- Reintroduced `top: 0` to `VisuallyHidden` CSS to prevent unexpected scrolling when using a `Sheet` ([#5208](https://github.com/Shopify/polaris-react/pull/5208)) - Fixed `Form` > `VisuallyHidden` markup causing excessive vertical whitespace ([#5181](https://github.com/Shopify/polaris-react/pull/5181)) ### Documentation diff --git a/src/styles/shared/_accessibility.scss b/src/styles/shared/_accessibility.scss index d5f84c3baae..6034bd96826 100644 --- a/src/styles/shared/_accessibility.scss +++ b/src/styles/shared/_accessibility.scss @@ -7,6 +7,10 @@ // Need to make sure we override any existing styles. // stylelint-disable declaration-no-important position: absolute !important; + // Top position is required to prevent unexpected + // scrolling with Sheet component + // https://github.com/Shopify/polaris-react/pull/5208 + top: 0; width: 1px !important; height: 1px !important; margin: 0 !important;