https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 42a98283681188744c47f2bba33ad818a5b8d585 authored by Stephen Chenney on 20 December 2018, 17:40:54 UTC
Fix table cell background painting under zoom and min-width
Tip revision: 42a9828
percentage-heights-002.html
<!DOCTYPE html>
<title>CSS Test: Percentage sizing in flexboxes</title>
<link rel="author" title="Google Inc." href="http://www.google.com/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#definite-sizes">
<link rel="match" href="percentage-heights-002-ref.html">
<meta name="assert" content="Checks that we correctly size percentage-sized
children of absolute-positioned flex boxes">
<style>
body {
  position: relative;
  width: 800px;
  height: 600px;
}

#container {
  background-color: red;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
}

#top-bar {
  background-color: green;
  height: 20%;
}

#content {
  background-color: blue;
  flex-basis: 100%;
}
</style>


<div id="container">
  <div id="top-bar">
  Tests that percentage heights get resolved correctly when the flexbox is
  </div>
  <div id="content">
  absolutely positioned without an explicit height. You should see no red.
  </div>
</div>


back to top