Search code examples
htmlcsstagsmedia-queries

What does >* do?


I encounter this several times, but i don't now what >* exactly is? I think it overwrites something, but i'm not sure.

.GridWrapper>* {
font-size: 14px
}

@media screen and (min-width:601px) {
.GridWrapper>* {
    font-size: 17px
}
}

Solution

  • A > B selector will select an element B that is a direct child of an element A; similar to A B, where it can be any descendant. * is any element. Thus, .GridWrapper > * means "all direct children of elements classed GridWrapper".

    More on MDN.