.parent {
    width: 300px;
    height: 300px;
    background: #38bad1;
    box-shadow: 0 0 20px -10px hsl(187, 97%, 24%);
    border: 1px dashed #1bd1d1;
    min-height: 100px;
    min-width: 100px;
    resize: both;
    overflow: hidden;
}
.parent > div {
    display: grid;
    place-items: center;
    font-size: 1.3em;
    padding: 0.5em;
    margin: 0.2em;
    border-radius: 1em;
}


.parent :nth-child(1) {
    background-color: hsla(30, 78%, 75%, 0.87);
    border: 1px dashed hsl(30, 90%, 37%);
}

.parent :nth-child(2) {
    background-color: hsla(90, 78%, 75%, 0.87);
    border: 1px dashed hsl(90, 90%, 37%);
}

.parent :nth-child(3) {
    background-color: hsla(200, 78%, 75%, 0.87);
    border: 1px dashed hsl(200, 90%, 37%);
}

.parent :nth-child(4) {
    background-color: hsla(260, 78%, 75%, 0.87);
    border: 1px dashed hsl(260, 90%, 37%);
}

.ex1 {
    display: grid;
    place-items: center
}

.ex2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.ex3 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.ex3 > div {
    flex: 0 1 150px;
    margin: 5px;
}

.ex4 {
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.ex4 > * {
    padding: 0.3em;
}

.ex5 {
    display: grid;
    grid-template-columns: minmax(150px, 25%) 1fr;
    width: 500px;
}
