use viewport detection instead of screen resolution