* {
    margin: 0; padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Verdana;
    background-color: darkseagreen;
}

h1 {
    text-align: center;
    margin-top: 8px;
}

h2 {
    margin: 8px;
    font-weight: normal;
    background-color: #234;
    color: #cec;
    padding: 4px;
}

/* DEMO #1: FLEX-GROW */

.flex-parent {
    border: 2px solid transparent;
    min-height: 100px;
    display: flex;
    margin: 8px 8px 40px 8px;
}

.flex-child {
    border: 2px solid green;
    min-height: 80px;
    margin: 8px;
    flex-grow: 1;
    text-align: center;
    font-weight: bold;
    background-color: aliceblue;
}

/* DEMO #2: SPACE-AROUND */

.demo2 .flex-parent {
    justify-content: space-around;
}

.demo2 .flex-child {
    flex-grow: 0;
    min-width: 16px;
    background-color: rgb(155, 255, 255);
}

/* DEMO #3: SPACE-BETWEEN */

.demo3 .flex-parent {
    justify-content: space-between;
}

.demo3 .flex-child {
    flex-grow: 0;
    min-width: 16px;
    background-color: rgb(94, 255, 255);
}

/* DEMO #4: SPACE-EVENLY */

.demo4 .flex-parent {
    justify-content: space-evenly;
}

.demo4 .flex-child {
    flex-grow: 0;
    min-width: 16px;
    background-color: aqua;
}

/* DEMO #5: FLEX-DIRECTION: ROW-REVERSE */

.demo5 .flex-parent {
    flex-direction: row-reverse;
}

.demo5 .flex-child:last-child {
    background-color: yellow;
}

/* DEMO #6: FLEX-WRAP: WRAP */

.demo6 .flex-parent {
    flex-wrap: wrap;
    /* flex-flow: row wrap; */
}

.demo6 .flex-child {
    background-color: pink;
    min-width: 200px;
    flex-grow: 1;
}

/* DEMO #7: ALIGN-SELF: CENTER */

.demo7 .flex-parent {
    min-height: 200px;
    justify-content: center;
}

.demo7 .flex-child {
    flex-grow: 0;
}

.demo7 .flex-child:last-child {
    background-color: yellow;
    max-height: 100px;
    align-self: center;
    aspect-ratio: 1;
}

/* DEMO #8: FLEX-BASIS */

.demo8 .flex-parent {
    flex-flow: row wrap;
    justify-content: center;
    gap: 10px;
}

.demo8 .flex-child {
    flex-basis: 25%;
    margin: 0;
    flex-grow: 1;
    background-color: mediumpurple
}