Added max-width to media queries

Sync with master commit 09c57ae60b684f2320d9b66f6b4dad8e36a00be2
added