Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Flexbox</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- Add your site or application content here -->
<main>
<h1>The Flexbox Sandbox</h1>
<section class="examples">
<div class="settings">
<div class="property">
<h2>flex-direction:</h2>
<p class="hint">the direction of the main axis</p>
<form>
<input type="radio" name="flex-direction" value="row" id="row" checked>
<label for="row">row</label>
<input type="radio" name="flex-direction" value="column" id="column">
<label for="column">column</label>
<input type="radio" name="flex-direction" value="row-reverse" id="row-reverse">
<label for="row-reverse">row-reverse</label>
<input type="radio" name="flex-direction" value="column-reverse" id="column-reverse">
<label for="column-reverse">column-reverse</label>
</form>
</div>
<div class="property">
<h2>flex-wrap:</h2>
<p class="hint">whether or not children will wrap within their container</p>
<form>
<input type="radio" name="flex-wrap" value="nowrap" id="nowrap" checked>
<label for="nowrap">nowrap</label>
<input type="radio" name="flex-wrap" value="wrap" id="wrap">
<label for="wrap">wrap</label>
<input type="radio" name="flex-wrap" value="wrap-reverse" id="wrap-reverse">
<label for="wrap-reverse">wrap-reverse</label>
</form>
</div>
<div class="property">
<h2>justify-content:</h2>
<p class="hint">positioning of elements along the main axis</p>
<form>
<input type="radio" name="justify-content" value="flex-start" id="flex-start" checked>
<label for="flex-start">flex-start</label>
<input type="radio" name="justify-content" value="flex-end" id="flex-end">
<label for="flex-end">flex-end</label>
<input type="radio" name="justify-content" value="center" id="center">
<label for="center">center</label>
<input type="radio" name="justify-content" value="space-between" id="space-between">
<label for="space-between">space-between</label>
<input type="radio" name="justify-content" value="space-around" id="space-around">
<label for="space-around">space-around</label>
</form>
</div>
<div class="property">
<h2>align-items:</h2>
<p class="hint">positions elements on the cross axis</p>
<form>
<input type="radio" name="align-items" value="stretch" id="stretch" checked>
<label for="stretch">stretch</label>
<input type="radio" name="align-items" value="flex-start" id="align-flex-start">
<label for="align-flex-start">flex-start</label>
<input type="radio" name="align-items" value="flex-end" id="align-flex-end">
<label for="align-flex-end">flex-end</label>
<input type="radio" name="align-items" value="center" id="align-center">
<label for="align-center">center</label>
<input type="radio" name="align-items" value="baseline" id="baseline">
<label for="baseline">baseline</label>
</form>
</div>
<div class="property">
<h2>align-content:</h2>
<p class="hint">aligns flex lines when content wraps</p>
<form>
<input type="radio" name="align-content" value="stretch" id="C-stretch" checked>
<label for="C-stretch">stretch</label>
<input type="radio" name="align-content" value="flex-start" id="C-flex-start">
<label for="C-flex-start">flex-start</label>
<input type="radio" name="align-content" value="flex-end" id="C-flex-end">
<label for="C-flex-end">flex-end</label>
<input type="radio" name="align-content" value="center" id="C-align-center">
<label for="C-align-center">center</label>
<input type="radio" name="align-content" value="space-between" id="C-space-between">
<label for="C-space-between">space-between</label>
<input type="radio" name="align-content" value="space-around" id="C-space-around">
<label for="C-space-around">space-around</label>
</form>
</div>
<hr>
<div class="property"></div>
<div class="childPROP property divide">
<h2>Child:</h2>
<p class="hint">choose a child to edit it's flex properties</p>
<form class="childPROP row">
<input type="button" name="add" value="+" id="addchild">
<input type="radio" name="child" value="1" id="1" checked>
<label for="1">1<span>x</span></label>
<input type="radio" name="child" value="2" id="2">
<label for="2">2<span>x</span></label>
<input type="radio" name="child" value="3" id="3">
<label for="3">3<span>x</span></label>
<input type="radio" name="child" value="4" id="4">
<label for="4">4<span>x</span></label>
<input type="radio" name="child" value="5" id="5">
<label for="5">5<span>x</span></label>
<!-- <label for="add">+</label>-->
</form>
</div>
<div class="childPROP property">
<h2>order:</h2>
<p class="hint">change the order in which a child appears</p>
<form class="row">
<input id="order" type="number" name="order" value="0" step="1">
<input class="order plus" name="order" type="button" value="-">
<input class="order plus" name="order" type="button" value="+">
</form>
</div>
<div class="childPROP property">
<h2>flex-grow:</h2>
<p class="hint">rate a child grows when there is extra space</p>
<form class="row">
<input id="flex-grow" type="number" name="flex-grow" value="0" step="1">
<input class="flex-grow minus" name="flex-grow" type="button" value="-">
<input class="flex-grow plus" name="flex-grow" type="button" value="+">
</form>
</div>
<div class="childPROP property">
<h2>flex-shrink:</h2>
<p class="hint">rate a child shrinks when there is not enough space for it</p>
<form class="row">
<input id="flex-shrink" type="number" name="flex-shrink" value="1" step="1">
<input class="flex-shrink minus" name="flex-shrink" type="button" value="-">
<input class="flex-shrink plus" name="flex-shrink" type="button" value="+">
</form>
</div>
<div class="childPROP property">
<h2>flex-basis:</h2>
<p class="hint">width of selected child</p>
<form class="mixed">
<div class="numANDunits">
<input id="flex-basis" type="number" name="flex-basis" step="any" value="0">
<select>
<option value="px">px</option>
<option value="%">%</option>
<!--
<option value="rem">rem</option>
<option value="em">em</option>
-->
</select>
</div>
<input type="radio" name="flex-basis" value="auto" id="auto" checked>
<label for="auto">auto</label>
<input type="radio" name="flex-basis" value="initial" id="initial">
<label for="initial">initial</label>
<input type="radio" name="flex-basis" value="inherit" id="inherit">
<label for="inherit">inherit</label>
<input type="radio" name="flex-basis" value="number" id="number">
</form>
</div>
<div class="childPROP property">
<h2>align-self:</h2>
<p class="hint">align-items for a specific child</p>
<form>
<input type="radio" name="align-self" value="auto" id="S-auto" checked>
<label for="S-auto">auto</label>
<input type="radio" name="align-self" value="stretch" id="S-stretch">
<label for="S-stretch">stretch</label>
<input type="radio" name="align-self" value="flex-start" id="S-align-flex-start">
<label for="S-align-flex-start">flex-start</label>
<input type="radio" name="align-self" value="flex-end" id="S-align-flex-end">
<label for="S-align-flex-end">flex-end</label>
<input type="radio" name="align-self" value="center" id="S-align-center">
<label for="S-align-center">center</label>
<input type="radio" name="align-self" value="baseline" id="S-baseline">
<label for="S-baseline">baseline</label>
</form>
</div>
</div>
<div class="sandbox" id="sandbox">
<div class="box">1</div>
<div class="box">2</div>
<div class="box">3</div>
<div class="box">4</div>
<div class="box">5</div>
</div>
</section>
<a href="pages/about.html">About Flexbox</a>
</main>
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script>
window.jQuery || document.write('<script src="js/vendor/jquery-1.12.0.min.js"><\/script>')
</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
</body>
</html>