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

LibWeb: height: 100% on inline element child does not work in grid/flex context #3422

Open
Lubrsi opened this issue Jan 31, 2025 · 2 comments
Labels
bug Something isn't working layout reduction of web content Issue has a simplified reduction based on real-world web content.

Comments

@Lubrsi
Copy link
Contributor

Lubrsi commented Jan 31, 2025

Test case:

<!doctype html><html><head><style>
img {
  display: block;
}
.grid {
  display: grid;
}
.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.flex {
  display: flex;
}
.w-full {
  width: 100%;
}
.h-full {
  height: 100%;
}
.flex-auto {
  flex: 1 1 auto;
}
.grid-auto-rows-350 {
  grid-auto-rows: 350px;
}
.red-background {
  background-color: red;
}
.green-background {
  background-color: green;
}
.inline {
  display: inline;
}
</style></head><body><div class="grid grid-cols-4 grid-auto-rows-350"><div class="red-background"><div class="inline"><div class="w-full h-full green-background">

Reduced from https://www.swfc.co.uk/ (affects a lot of EFL club websites, as they were made by the same web design shop and white labelled for the clubs)

@Lubrsi Lubrsi added bug Something isn't working layout reduction of web content Issue has a simplified reduction based on real-world web content. labels Jan 31, 2025
@GlowGothic
Copy link

<!doctype html>

<style> img { display: block; } .grid { display: grid; } .grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .flex { display: flex; } .w-full { width: 100%; } .h-full { height: 100%; } .flex-auto { flex: 1 1 auto; } .grid-auto-rows-350 { grid-auto-rows: 350px; } .red-background { background-color: red; } .green-background { background-color: green; } /* Change from inline to inline-block so that height: 100% works */ .inline { display: inline-block; } </style>

@AtkinsSJ
Copy link
Member

@GlowGothic This is a bug about the browser not working properly. We can't expect (and don't want!) websites to change to work around our bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working layout reduction of web content Issue has a simplified reduction based on real-world web content.
Projects
None yet
Development

No branches or pull requests

3 participants