Не показывает flex по изменению если @media (max-width: 997px)

Valery Anestiadi

Наверно что-то зависит от браузеров?

.articles-list { display: flex; flex-direction: row; justify-content: flex-start; align-items: flex-start; flex-wrap: wrap; align-content: stretch; .item { margin-top: 0; margin-right: 5px; margin-bottom: 20px; margin-left: 5px; align-self: flex-start; flex: 1 0 30%; }
}
@media screen and (max-width: 991px) { .item { flex: 1 0 48%; }
}
1 ответ

Valery Anestiadi

.articles-list { display: flex; flex-direction: row; justify-content: flex-start; align-items: flex-start; flex-wrap: wrap; align-content: stretch; .item { margin-top: 0; margin-right: 5px; margin-bottom: 20px; margin-left: 5px; align-self: flex-start; flex: 1 0 30%; }
}
@media screen and(max-width: 997px) { .articles-list { .item { flex: 1 0 48%; } }
}

или так

.articles-list { display: flex; flex-direction: row; justify-content: flex-start; align-items: flex-start; flex-wrap: wrap; align-content: stretch; .item { margin-top: 0; margin-right: 5px; margin-bottom: 20px; margin-left: 5px; align-self: flex-start; flex: 1 0 30%; @media screen and(max-width: 997px) { & { flex: 1 0 48%; } } }
}

licensed under cc by-sa 3.0 with attribution.