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

CSS gap adds too much space at the end #2167

Closed
Zerotask opened this issue May 28, 2024 · 2 comments · Fixed by #2162
Closed

CSS gap adds too much space at the end #2167

Zerotask opened this issue May 28, 2024 · 2 comments · Fixed by #2162

Comments

@Zerotask
Copy link

Zerotask commented May 28, 2024

Example:
https://play.tailwindcss.com/OM1dOhPIMq

<div class="grid grid-cols-2 gap-4 bg-slate-200">
  <div class="bg-yellow-200">left</div>
  <div class="bg-gray-400">right</div>
  <div class="bg-yellow-200">left</div>
  <div class="bg-gray-400">right</div>
  <div class="bg-yellow-200">left</div>
  <div class="bg-gray-400">right</div>
  <div class="bg-yellow-200">left</div>
  <div class="bg-gray-400">right</div>
  <div class="bg-yellow-200">left</div>
  <div class="bg-gray-400">right</div>
  <div class="bg-yellow-200">left</div>
  <div class="bg-gray-400">right</div>
  <div class="bg-yellow-200">left</div>
  <div class="bg-gray-400">right</div>
</div>
.gap-4 {     
    gap: 1rem/* 16px */; 
}
.grid {     
    display: grid; 
}
.grid-cols-2 {     
    grid-template-columns: repeat(2, minmax(0, 1fr)); 
}

If I try that with weasyprint (with different colors) I get this result:
image

I seems to add this. the more divs you have, the greater is the space at the bottom

@liZe
Copy link
Member

liZe commented May 28, 2024

Hi!

Thanks for the report. Good news: I think that it’s already been fixed in the grid-auto-flow-column branch that will be merged soon.

@Zerotask
Copy link
Author

Zerotask commented Jun 4, 2024

I can confirm that it's fixed with the latest commit. Thank you.

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 a pull request may close this issue.

2 participants