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

Include scrollbar width in media calculation #698

Merged
merged 1 commit into from
Oct 13, 2023
Merged

Conversation

danielfdsilva
Copy link
Collaborator

@danielfdsilva danielfdsilva commented Oct 12, 2023

Turns out that the difference in the returned values was due to the fact that CSS includes the scrollbar width in the media size calculation, and the hook wasn't doing that.

Should not impact the app in any negative way, but it is worth a quick check.

@netlify
Copy link

netlify bot commented Oct 12, 2023

Deploy Preview for veda-ui ready!

Name Link
🔨 Latest commit 84e13f2
🔍 Latest deploy log https://app.netlify.com/sites/veda-ui/deploys/6527b32c52b90a00088c2aee
😎 Deploy Preview https://deploy-preview-698--veda-ui.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@hanbyul-here hanbyul-here left a comment

Choose a reason for hiding this comment

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

React Cool Deimensions seems to be written specifically for container query, not for media query based on their readme. (https://www.npmjs.com/package/react-cool-dimensions#features) It might be worth looking at other libs/ if we are not using its container query feature in the future. But this is for the future, not a blocker.

@danielfdsilva danielfdsilva merged commit 1bb5c5e into main Oct 13, 2023
@danielfdsilva danielfdsilva deleted the fix/697-media branch October 13, 2023 10:04
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.

2 participants