Skip to content

Fix scrollbars on MacOS #781

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

Merged
merged 2 commits into from
Aug 23, 2023
Merged

Fix scrollbars on MacOS #781

merged 2 commits into from
Aug 23, 2023

Conversation

sfc-gh-jgarcia
Copy link
Contributor

@sfc-gh-jgarcia sfc-gh-jgarcia commented Aug 18, 2023

📚 Context

This PR fixes an issue reported by @sfc-gh-tteixeira where the Algolia popup would not have its right corners rounded.

Screenshot 2023-08-17 at 11 43 00

🧠 Description of Changes

The main reason for this was that some styles we added for our scrollbars, which were meant to be applied on Windows machines, were also "leaking" on Mac computers as well. The reason for this was that our code was checking for platforms that were called Mac, but now that Apple also has MacIntel platforms, we need to ensure we accommodate for both scenarios. Changes made where:

  • Updated pages/_app.js to check if the word Mac is present on the navigator.platform prop, instead of strictly checking for it to be Mac only;
  • Added some specificity to the scrollbars.scss :not(.mac) selector

Revised:

Kapture.2023-08-18.at.16.39.42.mp4

Current:

Kapture.2023-08-18.at.16.40.43.mp4

💥 Impact

Size:

  • Small
  • Not small

🌐 References

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@sfc-gh-jgarcia sfc-gh-jgarcia changed the title Fix scrollbars for mac os Fix scrollbars on MacOS Aug 18, 2023
@sfc-gh-jgarcia sfc-gh-jgarcia marked this pull request as ready for review August 18, 2023 19:55
@sfc-gh-dmatthews
Copy link
Contributor

I'm not sure if it's intentional or not, but when I look at the preview, the scroll bar stays in light mode when the site is in dark mode (both for the search dialog and the main page). I looked in Chrome, Firefox, and Safari on MacOS.

image

@snehankekre snehankekre self-requested a review August 21, 2023 08:20
Copy link
Contributor

@snehankekre snehankekre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @sfc-gh-jgarcia!

@snehankekre snehankekre merged commit 81fbcca into main Aug 23, 2023
@snehankekre snehankekre deleted the fix-search-corner-radius branch August 23, 2023 09:19
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.

3 participants