Border optimization in `Viewport`