Skip to content

Make sponsors section responsive #157

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 1 commit into from
Jul 9, 2024
Merged

Make sponsors section responsive #157

merged 1 commit into from
Jul 9, 2024

Conversation

leaysgur
Copy link
Member

@leaysgur leaysgur commented Jul 9, 2024

image

TL;DR: Fixes this unintended horizontal scroll bar appearance.

To make sponsor image responsive, we need to set svg's container size as width: 100%.
And also svg element should have viewBox attribute to render inner content properly.

But vite-svg-loader(rather their deep dependency svgo) removes viewBox property by default...

To cope with it, there are 3 ways:

  1. Override default config like: Added configuration to preserve viewBox attribute in README jpkleemans/vite-svg-loader#120
  2. Add viewBox="0 0 800 691" attribute manually
  3. Do not rely on loaders

I chose 3 for simplicity and faster build time.

Copy link

netlify bot commented Jul 9, 2024

Deploy Preview for oxc-project ready!

Name Link
🔨 Latest commit 402e4ef
🔍 Latest deploy log https://app.netlify.com/sites/oxc-project/deploys/668ca330536d500008ca2ae0
😎 Deploy Preview https://deploy-preview-157--oxc-project.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.

@Boshen
Copy link
Member

Boshen commented Jul 9, 2024

Thank you! I'm a noob in this kind of tasks.

@Boshen Boshen merged commit 78338cc into oxc-project:main Jul 9, 2024
7 checks passed
nrayburn-tech pushed a commit to nrayburn-tech/oxc-project.github.io that referenced this pull request Jul 4, 2025
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