Improvements to breakpoint handling in CSS and JS