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: og image cards overflow #89

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

fix: og image cards overflow #89

wants to merge 4 commits into from

Conversation

Yizack
Copy link

@Yizack Yizack commented Sep 20, 2024

πŸ”— Linked issue

resolves #88

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

I'm not a Tailwind expert but it seems like the og module is not seeing the colors when using classes like bg-gray-900, text-gray-400 so instead I used Arbitrary values. If someone knows how to make the color classes work the help is welcomed!

And for fixing the overflowing I simply added the overflow-hidden tailwing class to each card

The image below is how it looks with the changes

image

@@ -40,7 +40,7 @@ const format = useNumberFormatter()
</svg>
<div class="font-medium text-4xl pl-2 pt-1">{{ format(contributor.score) }}</div>
</div>
<div class="flex flex-row text-gray-400 items-center pt-3 font-medium text-3xl">
<div class="flex flex-row text-[#94a3b8] items-center pt-3 font-medium text-3xl">
Copy link
Member

Choose a reason for hiding this comment

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

what's the reason for not using tailwind colours?

Copy link
Author

@Yizack Yizack Oct 25, 2024

Choose a reason for hiding this comment

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

I can't really tell why but some defined tailwind colors aren't being applied on the rendered image, for example bg-gray-900 is rendering a black background and text-gray-400 is rendering a black text even if the colors are defined in tailwind.config.ts

image

Copy link
Author

@Yizack Yizack Oct 28, 2024

Choose a reason for hiding this comment

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

Alright, ignore the previous response, I updated my branch from upstream and it seems like the tailwind colors issue has been resolved with some dependency updates before so I reverted the class changes from my PR

@@ -10,7 +10,7 @@ const format = useNumberFormatter()
</script>

<template>
<div class="flex flex-row justify-between w-full p-[38px] bg-gray-900">
<div class="flex flex-row justify-between w-full p-[38px] bg-[#0f172a]">
Copy link
Member

@arashsheyda arashsheyda Oct 25, 2024

Choose a reason for hiding this comment

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

can you add h-full so we get rid of the white space at the bottom? thanks

Screenshot 2024-10-25 at 2 44 30β€―AM

Copy link
Author

Choose a reason for hiding this comment

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

Done!

@Yizack Yizack changed the title fix: og image colors and cards overflow fix: og image cards overflow Oct 28, 2024
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.

OG Image wrong colors and cards are overflowing
2 participants