Здравствуйте! Код получился довольно громоздким, было интересно!
Скажите пожалуйста, всё ли правильно я сделал, или какие-то моменты можно было написать более оптимально?
.palette-small {
display: flex;
}
.palette-box:nth-child(1) .palette-small {
flex-direction: column;
justify-content: center;
}
.palette-box:nth-child(1) .palette-small .color-3, .color-4 {
align-self: center;
}
.palette-box:nth-child(1) .palette-small .color-4 {
order: 2;
}
.palette-box:nth-child(1) .palette-small .color-3, .color-5 {
order: -1;
}
.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-4 {
align-self: flex-start;
}
.palette-box:nth-child(2) .palette-small .color-2, .color-6 {
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 {
flex-direction: row;
justify-content: space-between;
}
.palette-box:nth-child(4) .palette-small .part {
display: flex;
flex-direction: column-reverse;
justify-content: space-between;
}
.palette-box:nth-child(4) .palette-small .part:first-child {
display: flex;
flex-direction: row;
}
.palette-box:nth-child(4) .palette-small .part:first-child .color-4 {
align-self: stretch;
}