simplify code for minimal border in small screen sizes