Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] smooth scrolling css leaks from component to whole package #2867

Closed
werdnanoslen opened this issue Apr 3, 2024 · 0 comments · Fixed by #2868
Closed

[fix] smooth scrolling css leaks from component to whole package #2867

werdnanoslen opened this issue Apr 3, 2024 · 0 comments · Fixed by #2868
Assignees
Labels
type: bug Something isn't working like it's supposed to

Comments

@werdnanoslen
Copy link
Contributor

ReactUSWDS Version & USWDS Version:

At least react-uswds v9.0.0

Describe the bug

This smooth scrolling leaks to any page where this package is used

@media not (prefers-reduced-motion) {
html {
scroll-behavior: smooth;
}
}

To Reproduce
Steps to reproduce the behavior:

  1. Use react-uswds on a page, use any component but InPageNavigation
  2. See that the smooth scrolling is applied to the html root

Expected behavior

It should only be applied where the InPageNavigation component is used.

Additional context

Device and Browser Information (please complete the following information if describing a UI bug):

All browsers

@werdnanoslen werdnanoslen added the type: bug Something isn't working like it's supposed to label Apr 3, 2024
@werdnanoslen werdnanoslen self-assigned this Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working like it's supposed to
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant