.palette-small {
display: flex;
}
.palette-box:first-child .palette-small {
flex-direction: column-reverse;
justify-content: center;
}
.palette-box:first-child .palette-small .color-3 {
align-self: center;
order: 1;
}
.palette-box:first-child .palette-small .color-4 {
align-self: center;
order: -1;
}
.palette-box:nth-child(2) .palette-small {
display: flex;
flex-direction: column-reverse;
justify-content: space-between;
align-items: flex-start;
}
.palette-box:nth-child(2) .palette-small .color-2,
.palette-box:nth-child(2) .palette-small .color-6 {
align-self: flex-end;
}
.palette-box:nth-child(3) .palette-small {
display: flex;
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 {
display: flex;
justify-content: space-between;
}
.palette-box:nth-child(4) .palette-small .part {
display: flex;
justify-content: space-between;
}
.palette-box:nth-child(4) .palette-small .part:nth-child(2) {
flex-direction: column-reverse;
justify-content: space-between;
align-items: flex-end;
}
Можно ли как-то оптимизировать код?