Посмотрите и оцените, пожалуйста, код
.palette-box .palette-small {
display: flex;
}
.palette-box:nth-child(1) .palette-small {
flex-direction: column;
justify-content: center;
align-items: center;
}
.palette-box:nth-child(1) .palette-small .color-4 {
order: 5;
}
.palette-box:nth-child(1) .palette-small .color-2 {
order: 4;
align-self: stretch;
}
.palette-box:nth-child(1) .palette-small .color-5 {
align-self: stretch;
}
.palette-box:nth-child(2) .palette-small {
flex-direction: column-reverse;
justify-content: space-between;
align-items: flex-start;
}
.palette-box:nth-child(2) .palette-small .color-6, .palette-box:nth-child(2) .palette-small .color-2 {
align-self: flex-end;
}
.palette-box:nth-child(3) .palette-small {
justify-content: space-between;
}
.palette-box:nth-child(3) .palette-small .part {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.palette-box:nth-child(4) .palette-small {
justify-content: space-between;
}
.palette-box:nth-child(4) .palette-small .part:first-child {
display: flex;
}
.palette-box:nth-child(4) .palette-small .part:last-child {
display: flex;
flex-direction: column-reverse;
justify-content: space-between;
}