Media Queries 'inherit' all the properties of the original element, and apply the specified changes in the actual media query.
Thus, your snippet effectively translates to:
.wrapper {
display: flex;
flex-wrap: wrap;
width: 100%;
margin: 0 auto;
padding: 0;
height: 80px;
top: 0;
z-index: 1;
border-bottom: solid 1px #eee;
}
@media only screen and (max-width: 450px) {
.wrapper {
display: flex;
flex-wrap: wrap;
width: 100%;
margin: 0 auto;
padding: 0;
height: 80px;
top: 0;
z-index: 1;
border-bottom: solid 1px #eee;
/* And then your changes, which override earlier properties */
height: 50px;
}
}
This makes it possible to simply design an UI once, and modify that UI for various devices without having to copy paste the entire code into various Media Queries all the time, which would increase maintenance, size of the CSS and becoming more error-prone (i.e. you'll be forced to make edits in multiple places, you could forget and edit somewhere when making changes, and all sorts of nasty stuff).
To elaborate a little; overlapping media queries can also influence each other when they effect a certain element and compete. In which case the latter specified one would be the displayed one when the media query is put into effect. Disregarding !important
tags, obviously. An more elaborate answer on this matter is discussed in this SO question.
The rules for these kind of situations are specified in the CSS Cascading and Inheritance rules, which are quite elaborately explained at Mozilla's Developer website.
Hope it helps!