Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flexbox/browsers/float.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}

textarea:nth-of-type(2) {
height: 100px
height: 110px
}

.playable-buttons {
Expand Down
2 changes: 1 addition & 1 deletion flexbox/browsers/inline-block.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}

textarea:nth-of-type(2) {
height: 100px
height: 110px
}

.playable-buttons {
Expand Down
2 changes: 1 addition & 1 deletion flexbox/browsers/table-cell.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}

textarea:nth-of-type(2) {
height: 100px
height: 110px
}

.playable-buttons {
Expand Down
4 changes: 2 additions & 2 deletions flexbox/browsers/vertical-align.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
}

textarea:nth-of-type(1) {
height: 170px
height: 190px
}

textarea:nth-of-type(2) {
height: 100px
height: 110px
}

.playable-buttons {
Expand Down
2 changes: 1 addition & 1 deletion flexbox/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ <h2>Common Use Cases of Flexbox</h2>
<ol>
<li><a href="use-cases/navigation.html">Navigation</a></li>
<li><a href="use-cases/navigation-flex.html">Navigation distributing space to items</a></li>
<li><a href="use-cases/navigation-split.html">Split navigation</a></li>
<li><a href="use-cases/split-navigation.html">Split navigation</a></li>
<li><a href="use-cases/center.html">Centering an item</a></li>
<li><a href="use-cases/cards.html">Card layout</a></li>
<li><a href="use-cases/media.html">Media object</a></li>
Expand Down
34 changes: 17 additions & 17 deletions flexbox/use-cases/cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
}

textarea:nth-of-type(1) {
height: 140px
height: 160px
}

textarea:nth-of-type(2) {
height: 250px
height: 300px
}

.playable-buttons {
Expand Down Expand Up @@ -109,30 +109,30 @@
</section>
<textarea class="playable-css">
.card {
display: flex;
flex-direction: column;
display: flex;
flex-direction: column;
}

.card .content {
flex: 1 1 auto;
flex: 1 1 auto;
}
</textarea>
</textarea>
<textarea id="code" class="playable-html">
<div class="cards">
<div class="card">
<div class="content">
<p>This card doesn't have much content.</p>
</div>
<footer>Card footer</footer>
<div class="card">
<div class="content">
<p>This card doesn't have much content.</p>
</div>
<div class="card">
<div class="content">
<p>This card has a lot more content which means that it defines the height of the container the cards are in. I've laid the cards out using grid layout, so the cards themselves will stretch to the same height.</p>
</div>
<footer>Card footer</footer>
<footer>Card footer</footer>
</div>
<div class="card">
<div class="content">
<p>This card has a lot more content which means that it defines the height of the container the cards are in. I've laid the cards out using grid layout, so the cards themselves will stretch to the same height.</p>
</div>
<footer>Card footer</footer>
</div>
</div>
</textarea>
</textarea>
<div class="playable-buttons">
<input id="reset" type="button" value="Reset">
</div>
Expand Down
6 changes: 3 additions & 3 deletions flexbox/use-cases/center.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}

textarea:nth-of-type(1) {
height: 170px
height: 190px
}

textarea:nth-of-type(2) {
Expand Down Expand Up @@ -95,12 +95,12 @@
width: 100px;
height: 100px;
}
</textarea>
</textarea>
<textarea id="code" class="playable-html">
<div class="box">
<div></div>
</div>
</textarea>
</textarea>
<div class="playable-buttons">
<input id="reset" type="button" value="Reset">
</div>
Expand Down
19 changes: 10 additions & 9 deletions flexbox/use-cases/input-button.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
}

textarea:nth-of-type(1) {
height: 170px
height: 140px
}

textarea:nth-of-type(2) {
height: 80px
height: 125px
}

.playable-buttons {
Expand Down Expand Up @@ -104,16 +104,17 @@
}

.wrapper input[type="text"] {
flex: 1 1 auto;
}


</textarea>
flex: 1 1 auto;
}
</textarea>
<textarea id="code" class="playable-html">
<form class="example">
<div class="wrapper"><input type="text" id="text"><input type="submit" value="Send"></div>
<div class="wrapper">
<input type="text" id="text">
<input type="submit" value="Send">
</div>
</form>
</textarea>
</textarea>
<div class="playable-buttons">
<input id="reset" type="button" value="Reset">
</div>
Expand Down
18 changes: 11 additions & 7 deletions flexbox/use-cases/label-input-button.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
}

textarea:nth-of-type(1) {
height: 170px
height: 160px
}

textarea:nth-of-type(2) {
height: 80px
height: 140px
}

.playable-buttons {
Expand Down Expand Up @@ -111,14 +111,18 @@
}

.wrapper input[type="text"] {
flex: 1 1 auto;
}
</textarea>
flex: 1 1 auto;
}
</textarea>
<textarea id="code" class="playable-html">
<form class="example">
<div class="wrapper"><label for="text">Label</label><input type="text" id="text"><input type="submit" value="Send"></div>
<div class="wrapper">
<label for="text">Label</label>
<input type="text" id="text">
<input type="submit" value="Send">
</div>
</form>
</textarea>
</textarea>
<div class="playable-buttons">
<input id="reset" type="button" value="Reset">
</div>
Expand Down
20 changes: 11 additions & 9 deletions flexbox/use-cases/media-flipped.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
}

textarea:nth-of-type(1) {
height: 180px
height: 250px
}

textarea:nth-of-type(2) {
height: 120px
height: 180px
}

.playable-buttons {
Expand Down Expand Up @@ -101,23 +101,25 @@
</section>
<textarea class="playable-css">
.media {
display: flex;
align-items: flex-start;
display: flex;
align-items: flex-start;
}

.media.flipped {
flex-direction: row-reverse;
flex-direction: row-reverse;
}

.media .content {
flex: 1;
padding: 10px;
flex: 1;
padding: 10px;
}
</textarea>
</textarea>
<textarea id="code" class="playable-html">
<div class="media flipped">
<div class="image"><img src="MDN.svg" alt="MDN logo"></div>
<div class="content">This is the content of my media object. Items directly inside the flex container will be aligned to flex-start.</div>
</div>
</textarea>
</textarea>
<div class="playable-buttons">
<input id="reset" type="button" value="Reset">
</div>
Expand Down
17 changes: 9 additions & 8 deletions flexbox/use-cases/media.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
}

textarea:nth-of-type(1) {
height: 160px
height: 180px
}

textarea:nth-of-type(2) {
height: 100px
height: 180px
}

.playable-buttons {
Expand Down Expand Up @@ -93,20 +93,21 @@
</section>
<textarea class="playable-css">
.media {
display: flex;
align-items: flex-start;
display: flex;
align-items: flex-start;
}

.media .content {
flex: 1;
padding: 10px;
flex: 1;
padding: 10px;
}
</textarea>
</textarea>
<textarea id="code" class="playable-html">
<div class="media">
<div class="image"><img src="MDN.svg" alt="MDN logo"></div>
<div class="content">This is the content of my media object. Items directly inside the flex container will be aligned to flex-start.</div>
</div>
</textarea>
</textarea>
<div class="playable-buttons">
<input id="reset" type="button" value="Reset">
</div>
Expand Down
18 changes: 9 additions & 9 deletions flexbox/use-cases/navigation-flex.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}

textarea:nth-of-type(2) {
height: 140px
height: 160px
}

.playable-buttons {
Expand Down Expand Up @@ -109,17 +109,17 @@
nav li {
flex: auto ;
}
</textarea>
</textarea>
<textarea id="code" class="playable-html">
<nav>
<ul>
<li><a href="#">Page 1</a></li>
<li><a href="#">Page 2</a></li>
<li><a href="#">Page 3 is longer</a></li>
<li><a href="#">Page 4</a></li>
</ul>
<ul>
<li><a href="#">Page 1</a></li>
<li><a href="#">Page 2</a></li>
<li><a href="#">Page 3 is longer</a></li>
<li><a href="#">Page 4</a></li>
</ul>
</nav>
</textarea>
</textarea>
<div class="playable-buttons">
<input id="reset" type="button" value="Reset">
</div>
Expand Down
18 changes: 9 additions & 9 deletions flexbox/use-cases/navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}

textarea:nth-of-type(2) {
height: 140px
height: 160px
}

.playable-buttons {
Expand Down Expand Up @@ -103,17 +103,17 @@
display: flex;
justify-content: space-between;
}
</textarea>
</textarea>
<textarea id="code" class="playable-html">
<nav>
<ul>
<li><a href="#">Page 1</a></li>
<li><a href="#">Page 2</a></li>
<li><a href="#">Page 3 is longer</a></li>
<li><a href="#">Page 4</a></li>
</ul>
<ul>
<li><a href="#">Page 1</a></li>
<li><a href="#">Page 2</a></li>
<li><a href="#">Page 3 is longer</a></li>
<li><a href="#">Page 4</a></li>
</ul>
</nav>
</textarea>
</textarea>
<div class="playable-buttons">
<input id="reset" type="button" value="Reset">
</div>
Expand Down
Loading