Skip to content

Commit 639da31

Browse files
fixing flex examples
1 parent 7f91cb3 commit 639da31

File tree

2 files changed

+32
-19
lines changed

2 files changed

+32
-19
lines changed

flexbox/basics/flex-properties.html

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
}
2727

2828
textarea:nth-of-type(1) {
29-
height: 120px
29+
height: 240px
3030
}
3131

3232
textarea:nth-of-type(2) {
@@ -55,11 +55,10 @@
5555
margin: 5px;
5656
}
5757

58-
.box>* {
58+
.box > * {
5959
border: 2px solid rgb(96, 139, 168);
6060
border-radius: 5px;
6161
background-color: rgba(96, 139, 168, .2);
62-
flex: 1 1 auto;
6362
}
6463

6564
.box {
@@ -68,6 +67,10 @@
6867
border: 2px dotted rgb(96, 139, 168);
6968
}
7069
</style>
70+
71+
<style class="editable">
72+
73+
</style>
7174
</head>
7275

7376
<body>
@@ -83,15 +86,23 @@
8386
display: flex;
8487
}
8588

86-
.box>* {
89+
.one {
90+
flex: 1 1 auto;
91+
}
92+
93+
.two {
94+
flex: 1 1 auto;
95+
}
96+
97+
.three {
8798
flex: 1 1 auto;
8899
}
89100
</textarea>
90101
<textarea id="code" class="playable-html">
91102
<div class="box">
92-
<div>One</div>
93-
<div>Two</div>
94-
<div>Three</div>
103+
<div class="one">One</div>
104+
<div class="two">Two</div>
105+
<div class="three">Three</div>
95106
</div>
96107
</textarea>
97108
<div class="playable-buttons">

flexbox/basics/flex-shorthands.html

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
}
2727

2828
textarea:nth-of-type(1) {
29-
height: 120px
29+
height: 240px
3030
}
3131

3232
textarea:nth-of-type(2) {
@@ -55,7 +55,7 @@
5555
margin: 5px;
5656
}
5757

58-
.box>* {
58+
.box > * {
5959
border: 2px solid rgb(96, 139, 168);
6060
border-radius: 5px;
6161
background-color: rgba(96, 139, 168, .2);
@@ -69,13 +69,7 @@
6969
</style>
7070

7171
<style class="editable">
72-
.box {
73-
display: flex;
74-
}
7572

76-
.box>* {
77-
flex: 1;
78-
}
7973
</style>
8074
</head>
8175

@@ -92,15 +86,23 @@
9286
display: flex;
9387
}
9488

95-
.box>* {
89+
.one {
90+
flex: 1;
91+
}
92+
93+
.two {
94+
flex: 1;
95+
}
96+
97+
.three {
9698
flex: 1;
9799
}
98100
</textarea>
99101
<textarea id="code" class="playable-html">
100102
<div class="box">
101-
<div>One</div>
102-
<div>Two</div>
103-
<div>Three</div>
103+
<div class="one">One</div>
104+
<div class="two">Two</div>
105+
<div class="three">Three</div>
104106
</div>
105107
</textarea>
106108
<div class="playable-buttons">

0 commit comments

Comments
 (0)