diff options
Diffstat (limited to 'testing/web-platform/tests/css/css-grid/grid-items/grid-intrinsic-maximums.html')
-rw-r--r-- | testing/web-platform/tests/css/css-grid/grid-items/grid-intrinsic-maximums.html | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-grid/grid-items/grid-intrinsic-maximums.html b/testing/web-platform/tests/css/css-grid/grid-items/grid-intrinsic-maximums.html new file mode 100644 index 0000000000..5b244d3c11 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/grid-items/grid-intrinsic-maximums.html @@ -0,0 +1,161 @@ +<!DOCTYPE html> +<html> +<title>CSS Grid: Grid item intrinsic maximum sizes</title> +<link rel="author" title="Serio Villar" href="mailto:svillar@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-items"> +<link href="/css/support/grid.css" rel="stylesheet"> +<link href="/css/support/width-keyword-classes.css" rel="stylesheet"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="match" href="grid-intrinsic-maximums-ref.html"> + +<style> + +.item { + font: 10px/1 Ahem; + background: cyan; + grid-column: 1 / -1; +} + +.abs { + width: 100%; + height: 5px; + position: absolute; +} + +.grid { + border: 2px solid black; + display: grid; + position: relative; + padding-top: 10px; + margin-bottom: 10px; + width: 100px; + justify-items: start; +} + +.float { + float: left; + width: 200px; +} + +.col1 { grid-column: 1 / 2; background: orange; } +.col2 { grid-column: 2 / 3; background: indigo; } +.col3 { grid-column: 3 / 4; background: green; } + +.gridMinContent { grid-template: 20px / minmax(0px, min-content) 5px; } +.gridMaxContent { grid-template: 20px / 5px minmax(0px, max-content); } +.gridMinMaxContent { grid-template: 20px / minmax(0px, min-content) 5% minmax(0px, max-content); } +.gridAutoMinContent { grid-template: 20px / minmax(0px, auto) 5px minmax(0px, min-content); } +.gridFitContentAuto { grid-template: 20px / fit-content(100px) 5px minmax(0px, auto); } + +</style> + +<div class="float"> + +<div class="grid gridMinContent"> + <div class="item" style="min-width: 15px;">XXXX XXXX</div> + <div class="abs col1"></div> + <div class="abs col2"></div> +</div> + +<div class="grid gridMinContent"> + <div class="item" style="min-width: 55px;">XXXX XXXX</div> + <div class="abs col1"></div> + <div class="abs col2"></div> +</div> + +<div class="grid gridMinContent"> + <div class="item min-width-max-content">XXXX XXXX</div> + <div class="abs col1"></div> + <div class="abs col2"></div> +</div> + +<div class="grid gridMaxContent"> + <div class="item" style="min-width: 15px;">XXXX XXXX</div> + <div class="abs col1"></div> + <div class="abs col2"></div> +</div> + +<div class="grid gridMaxContent"> + <div class="item" style="min-width: 55px;">XXXX XXXX</div> + <div class="abs col1"></div> + <div class="abs col2"></div> +</div> + +<div class="grid gridMaxContent"> + <div class="item min-width-max-content">XXXX XXXX</div> + <div class="abs col1"></div> + <div class="abs col2"></div> +</div> + +</div> + +<div class="float"> + +<div class="grid gridMinMaxContent"> + <div class="item" style="min-width: 15px;">XXXX XXXX</div> + <div class="abs col1"></div> + <div class="abs col2"></div> + <div class="abs col3"></div> +</div> + +<div class="grid gridMinMaxContent"> + <div class="item" style="min-width: 55px;">XXXX XXXX</div> + <div class="abs col1"></div> + <div class="abs col2"></div> + <div class="abs col3"></div> +</div> + +<div class="grid gridMinMaxContent"> + <div class="item min-width-max-content">XXXX XXXX</div> + <div class="abs col1"></div> + <div class="abs col2"></div> + <div class="abs col3"></div> +</div> + +<div class="grid gridAutoMinContent"> + <div class="item" style="min-width: 15px;">XXXX XXXX</div> + <div class="abs col1"></div> + <div class="abs col2"></div> + <div class="abs col3"></div> +</div> + +<div class="grid gridAutoMinContent"> + <div class="item" style="min-width: 55px;">XXXX XXXX</div> + <div class="abs col1"></div> + <div class="abs col2"></div> + <div class="abs col3"></div> +</div> + +<div class="grid gridAutoMinContent" style="justify-items: start"> + <div class="item min-width-max-content">XXXX XXXX</div> + <div class="abs col1"></div> + <div class="abs col2"></div> + <div class="abs col3"></div> +</div> + +</div> + +<div class="float"> + +<div class="grid gridFitContentAuto"> + <div class="item" style="min-width: 15px;">XXXX XXXX</div> + <div class="abs col1"></div> + <div class="abs col2"></div> + <div class="abs col3"></div> +</div> + +<div class="grid gridFitContentAuto"> + <div class="item" style="min-width: 55px;">XXXX XXXX</div> + <div class="abs col1"></div> + <div class="abs col2"></div> + <div class="abs col3"></div> +</div> + +<div class="grid gridFitContentAuto"> + <div class="item min-width-max-content">XXXX XXXX</div> + <div class="abs col1"></div> + <div class="abs col2"></div> + <div class="abs col3"></div> +</div> + +</div> |