Ребят, подскажите все ли оптимально по коду. Не все моменты по свойствам понял достаточно четко. Буду рад фидбеку. Спасибо.
И не понял какая логика у свойства “order”. По нему не хватило информации в теории курса.
.palette-small {
display: flex;
}
/* -1- */
.palette-box:nth-child(1) .palette-small {
flex-direction: column;
justify-content: center;
}
.palette-box:nth-child(1) .color-2 {
order: 3;
}
.palette-box:nth-child(1) .color-3 {
align-self: center;
}
.palette-box:nth-child(1) .color-4 {
align-self: center;
order: 3;
}
/* -2- */
.palette-box:nth-child(2) .palette-small {
flex-direction: column;
justify-content: space-between;
}
.palette-box:nth-child(2) .color-1 {
align-self: flex-start;
order: -1;
}
.palette-box:nth-child(2) .color-4 {
align-self: flex-start;
}
.palette-box:nth-child(2) .color-2 {
align-self: flex-end;
order: 3;
}
.palette-box:nth-child(2) .color-6 {
align-self: flex-end;
order: 2;
}
/* -3- */
.palette-box:nth-child(3) .palette-small {
justify-content: space-between;
}
.palette-box:nth-child(3) .part:nth-child(1) {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.palette-box:nth-child(3) .part:nth-child(2) {
display: flex;
flex-direction: column;
justify-content: space-between;
}
/* -4- */
.palette-box:nth-child(4) .palette-small{
justify-content: space-between;
}
.palette-box:nth-child(4) .part:nth-child(1) {
display: flex;
}
.palette-box:nth-child(4) .part:nth-child(2) {
display:flex;
flex-direction: column-reverse;
justify-content: space-between;
}