A function to check browser window size when the browser viewport changes.